Details
-
Bug
-
Status: Closed (View Workflow)
-
TBD
-
Resolution: Done
-
33.0.1
-
None
-
CP: sprint 116
-
1
-
Core: Platform
Description
Steps to Reproduce:
- Building or releasing mod-user-import master fails when run locally from the shell
The unit tests succeed when run from IDE and on Jenkins.
Cause is a race condition:
https://github.com/folio-org/raml-module-builder/blob/v33.0.1/domain-models-runtime/src/main/java/org/folio/rest/RestVerticle.java#L114-L119
https://github.com/folio-org/raml-module-builder/blob/v33.0.1/domain-models-runtime/src/main/java/org/folio/rest/tools/client/HttpClientFactory.java#L17-L21
Mocking can be enabled by setting a Verticle DeploymentOption. RestVerticle reads it and passes this information to HttpClientFactory by setting a system property.
HttpClientFactory checks the system property when the class loader loads the HttpClientFactory class, this might be before RestVerticle sets the system property (race condition).
Solution: RestVerticle should also programmatically enable mocking in HttpClientFactory.
TestRail: Results
Attachments
Issue Links
- blocks
-
MODUIMP-52 RMB 33.0.2, fix HttpClientMock2 not enabled due to race condition
-
- Closed
-