Java API client (resttemplate) failed to compile in 2.3.0 while it's compiled without issues in master (2.2.3)
Currently, the Travis CI test for Java (resttemplate) API client is commented out.
2.3.0
To repeat the issue:
git checkout 2.3.0
mvn clean package -DskipTests
./bin/java-petstore-resttemplate.sh
cd samples/client/petstore/java/resttemplate/
mvn test
If anyone wants to work on the fix, please reply to let us know.
the compiling failure is due to #4029, which added "threetenbp" support and set it as the default "dateLibrary" for java client on 2.3.0 branch, while the "resttemplate" mustaches are not adapted for the new date library yet.
A quick fix would be adding "dateLibrary=joda" in java-petstore-resttemplate.sh to make the "resttemplate" sample fall back to joda, while a thorough fix would be making "resttemplate" support "threetenbp".
@simingweng yes, that's correct. Would you have time to contribute the thorough fix as you've mentioned?
Yes, although it would be my first constribution to the project, more than happy to help. I expect to submit a pull request for review within a day or two.
The following unit tests (they're untouched in my fix) in the resttemplate sample client are failing due to 500 error from petstore server:
testLoginUser(io.swagger.client.api.UserApiTest): {"code":500,"type":"unknown","message":"something bad happened"}
testCreateUser(io.swagger.client.api.UserApiTest): {"code":500,"type":"unknown","message":"something bad happened"}
testCreateUsersWithList(io.swagger.client.api.UserApiTest): {"code":500,"type":"unknown","message":"something bad happened"}
testCreateUsersWithArray(io.swagger.client.api.UserApiTest): {"code":500,"type":"unknown","message":"something bad happened"}
I tried unit tests in other sibling sample client, such as jersey2, on 2.3.0 branch, the same failures exit. Is this a known issue? Do I need to worry about it?
@simingweng I think that's because the pubic Petstore server contains bad data. The CIs run a local Petstore server so please push the change so that the CIs can run the tests for you (without using the public Petstore server)
I added my repository to CI, and pushed a change and saw build created successfully, but just not started. Is it due to long queue for Mac OS X jobs on Travis?
@simingweng yup, we just have to wait.
CI failed, but I didn't see any resttemplate logs, the only 3 errors I can see were related to Swift
, and at the end of the log says job terminated because log exceeded 4MB
fix_issue_5640_#3_CI_failure.txt
@simingweng please file a PR and I'll look into the CI failure
can be closed ?
@cbornet right, thanks for the reminder.
Most helpful comment
Yes, although it would be my first constribution to the project, more than happy to help. I expect to submit a pull request for review within a day or two.