Skip to content

Commit

Permalink
test: Improve test resilience if startForUnitTests fails (#6645)
Browse files Browse the repository at this point in the history
  • Loading branch information
devinrsmith authored Feb 13, 2025
1 parent 953c91e commit 98fcedc
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,17 @@ public void join() throws InterruptedException {

void startForUnitTests() throws Exception {
setInstance(this);
pluginRegistration.registerAll();
applicationInjector.run();
executionContextProvider.get().getQueryLibrary().updateVersionString("DEFAULT");
try {
pluginRegistration.registerAll();
applicationInjector.run();
executionContextProvider.get().getQueryLibrary().updateVersionString("DEFAULT");

log.info().append("Starting server...").endl();
server.start();
log.info().append("Starting server...").endl();
server.start();
} catch (Exception e) {
clearInstance(this);
throw e;
}
}

void teardownForUnitTests() throws InterruptedException {
Expand Down

0 comments on commit 98fcedc

Please sign in to comment.