-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: fix NeonBeeTestBaseTest on GitHub
After many CI related fixes, the NeonBeeTestBaseTest was the last test that did fail on the GitHub workflow, for a long thought inexplicable reason. The root cause finally identfied, revealed a series of yet unfound issues. The reason why the NeonBeeTestBaseTest failed in the first place, is that if a custom provideUserPrincipal method was provided in a test, the NeonBeeTestBase attempted to replace the ServerVerticle with a custom ServerVerticle that was invoking provideUserPrincipal to retrieve the user principal it should return. However due to an issue causing the port to already be blocked for the second deployment of ServerVerticle, the setUp of NeonBeeTestBase failed. Due to a bug in the setUp code, the CountDownLatch used to stop JUnit from invoking more `@BeforeEach` methods, before NeonBee was initialized, the thread was blocked forever and JUnit (as well as any built-in logic in the `@Timeout` annotation) was not able to finish the test and the execution stalled. This commit fixes all issues related to this behaviour by: - check all latches and make sure they ALWAYS use timeouts - have NeonBee not close Vert.x that had been supplied from the outside - make injecting a custom user principal more reslient to failure
- Loading branch information
Showing
4 changed files
with
158 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters