Uploaded image for project: 'Apache Fineract'
  1. Apache Fineract
  2. FINERACT-1064

Make class ApiParameterError immutable (almost)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.4.0
    • None
    • None

    Description

      https://travis-ci.org/github/apache/fineract/builds/703530837 for https://github.com/apache/fineract/pull/1127 failed with:

      AccountNumberPreferencesTest > testAccountNumberPreferences() FAILED
          java.lang.AssertionError: 1 expectation failed.
      
          Expected status code <400> but was <500>.
      
              at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      
              at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      
              at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      
              at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
      
              at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:72)
      
              at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:59)
      
              at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:84)
      
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:277)
      
              at io.restassured.internal.ResponseSpecificationImpl$HamcrestAssertionClosure.validate(ResponseSpecificationImpl.groovy:493)
      
              at io.restassured.internal.ResponseSpecificationImpl$HamcrestAssertionClosure$validate$1.call(Unknown Source)
      
              at io.restassured.internal.RequestSpecificationImpl.applyPathParamsAndSendRequest(RequestSpecificationImpl.groovy:1656)
      
              at jdk.internal.reflect.GeneratedMethodAccessor86.invoke(Unknown Source)
      
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      
              at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      
              at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
      
              at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
      
              at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1262)
      
              at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1029)
      
              at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:816)
      
              at groovy.lang.GroovyObject.invokeMethod(GroovyObject.java:39)
      
              at org.codehaus.groovy.runtime.callsite.PogoInterceptableSite.call(PogoInterceptableSite.java:45)
      
              at org.codehaus.groovy.runtime.callsite.PogoInterceptableSite.callCurrent(PogoInterceptableSite.java:55)
      
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:203)
      
              at io.restassured.internal.RequestSpecificationImpl.applyPathParamsAndSendRequest(RequestSpecificationImpl.groovy:1661)
      
              at jdk.internal.reflect.GeneratedMethodAccessor85.invoke(Unknown Source)
      
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      
              at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      
              at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
      
              at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
      
              at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1262)
      
              at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1029)
      
              at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:816)
      
              at groovy.lang.GroovyObject.invokeMethod(GroovyObject.java:39)
      
              at org.codehaus.groovy.runtime.callsite.PogoInterceptableSite.call(PogoInterceptableSite.java:45)
      
              at org.codehaus.groovy.runtime.callsite.PogoInterceptableSite.callCurrent(PogoInterceptableSite.java:55)
      
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:203)
      
              at io.restassured.internal.RequestSpecificationImpl.post(RequestSpecificationImpl.groovy:175)
      
              at io.restassured.internal.RequestSpecificationImpl.post(RequestSpecificationImpl.groovy)
      
              at org.apache.fineract.integrationtests.common.Utils.performServerPost(Utils.java:155)
      
              at org.apache.fineract.integrationtests.common.system.AccountNumberPreferencesHelper.createAccountNumberPreferenceWithInvalidData(AccountNumberPreferencesHelper.java:98)
      
              at org.apache.fineract.integrationtests.AccountNumberPreferencesTest.createAccountNumberPreferenceInvalidData(AccountNumberPreferencesTest.java:230)
      
              at org.apache.fineract.integrationtests.AccountNumberPreferencesTest.createAccountNumberPreference(AccountNumberPreferencesTest.java:205)
      
              at org.apache.fineract.integrationtests.AccountNumberPreferencesTest.testAccountNumberPreferences(AccountNumberPreferencesTest.java:120)

      It's not clear from this what Server Side Error (HTTP 500) caused this.

      Could it be FINERACT-778 rearing it's ugly head again? Unlikely, probably.

      Or is it actually a change in that PR? If it's reproducible, perhaps this is a good opportunity to try to improve error logging (server side send stack trace to client, test should output it?)...

      I'll properly investigate it when I have some time.

      Attachments

        Issue Links

          Activity

            People

              vorburger Michael Vorburger
              vorburger Michael Vorburger
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: