-
Bug
-
Resolution: Done
-
Major
-
None
-
False
-
None
-
False
-
---
-
-
This is fixing an issue we had over at https://github.com/quarkiverse/quarkus-cxf/pull/669#issuecomment-1382911655 (cc @shumonsharif @ppalaga).
Without this fix QuarkusProdModeTest does the following when `run` and `expectExit` are enabled:
- `beforeAll`:
- start the app and wait for it to exit
- setup RestAssured URL (`RestAssuredURLManager` stores the previous port)
- `beforeEach` :
- again start the app and wait for it to exit
- again setup RestAssured URL, loosing the initially stored port to restore
- `afterAll`:
- clear the RestAssured URL, but not with the initially stored port
This fix:
- makes sure that the app is not stared again for each test method when `expectExit` is enabled
- does not even set up RestAssured URL when `expectExit` is enabled (App will have exited anyway)
- make setup/clean of RestAssured URL consistent with (manual) `start()`/`stop()`
Please note that there can still be inconsistencies w.r.t. to the URL when using multiple `QuarkusProdModeTest`s because there is only one static URL Manager, not one for each extension.