Skip to content

Commit

Permalink
#277 prevent EmbeddedDatabaseTestExecutionListener from affecting non…
Browse files Browse the repository at this point in the history
…-annotated tests
  • Loading branch information
tomix26 committed Nov 25, 2024
1 parent 49e474f commit ecfa006
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ private void captureTestClassPreparers(TestContext testContext, RefreshMode... r
private void forEachDatabase(TestContext testContext, RefreshMode[] refreshModes, BiConsumer<DatabaseContext, AutoConfigureEmbeddedDatabase> action) {
Set<AutoConfigureEmbeddedDatabase> annotations = AnnotationUtils.getDatabaseAnnotations(testContext.getTestClass());

if (annotations.isEmpty()) {
return;
}

ApplicationContext applicationContext = testContext.getApplicationContext();
Environment environment = applicationContext.getEnvironment();

Expand Down

0 comments on commit ecfa006

Please sign in to comment.