cerner / ccl-testing

A collection of maven plugins and their dependencies to perform CCL Unit tests and static analyses and to generate reports from the results.
Apache License 2.0
16 stars 11 forks source link

Switch JSON library from json-lib to gson #46

Closed jkuester closed 4 years ago

jkuester commented 4 years ago

The json-lib dependency is no longer being maintained (has not been updated since 2010) and it depends on an old (unmaintained) version of the Apache commons-lang dependency with a defect in the NumberUtils that can cause a loss of precision when unpacking numeric values from a String.

These changes are to switch the library used for packing/unpacking the JSON request/reply data from json-lib to Google's popular gson library.

Closes #44

feckertson commented 4 years ago

The integration tests won't pass. For some reason the jaxb files are not being generated for whitenoise... before an ant task tries to modify them at least. This is not a problem for the code in master.

Note that the test CclExecutorITest#testReadUtf8 fails when executed against a Linux back end because of a CCL issue. A work around has been pushed to master.

jkuester commented 4 years ago

Shoot. I did not realize that the Travis build was skipping the integration tests. I am going to close this for now because after spending days now trying to get the integration tests for the master branch to work on my machine I am still unable to get a successful build (and so cannot even begin to debug what problems are being introduced here with Gson).

feckertson commented 4 years ago

It's a drag, but the integration tests require an HNAM domain and there currently isn't any plumbing from travis back to one. I'm open to suggestions. A jenkins pipeline would work if github could message back to a jenkins box. I hear that we (cerner) have travis-enterprise access that might be able to do it.

The trick to getting the integration tests to work locally is that the profile being used needs to have a property named with value equal to the profile's id and the profile needs to have an with a whose is maven-profile and whose is the id of the profile. This is documented somewhere in the contributing guide.

I mainly just wanted to advise you why there is a hold up but also thought it might be nice to have additional eyes trying to solve the integration test problem.

jkuester commented 4 years ago

Yeah, if I had thought more about it originally, I would not have expected Travis to run the integration tests.

What is confusing to me is that running the tests locally I think I have my Maven profile setup properly since most of the j4ccl-ssh integration tests work. But I have not been able to figure out why the last j4ccl-ssh test is failing. Then when I switched to the ccl-maven-plugin integration tests most of them were also failing for reasons that I could never understand. (They both seem related to the envset call...) If you have any thoughts on what might cause that I am all ears! (Here are the logs from my Maven runs)