Skip to content

Commit 412f977

Browse files
committed
Refactor ReactiveMultitenantTest
1 parent 34f5c57 commit 412f977

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

hibernate-reactive-core/src/test/java/org/hibernate/reactive/ReactiveMultitenantTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,9 @@ public class ReactiveMultitenantTest extends BaseReactiveTest {
4343
// To check if we are using the right database we run native queries for PostgreSQL
4444
@Rule
4545
public DatabaseSelectionRule selectionRule = DatabaseSelectionRule.runOnlyFor( POSTGRESQL );
46-
private static boolean createdDatabase;
4746

4847
@Override
4948
protected Configuration constructConfiguration() {
50-
createdDatabase = true;
5149
Configuration configuration = super.constructConfiguration();
5250
configuration.addAnnotatedClass( GuineaPig.class );
5351
configuration.setProperty( Settings.MULTI_TENANT, MultiTenancyStrategy.DATABASE.name() );
@@ -104,7 +102,7 @@ public void testTenantSelection(TestContext context) {
104102

105103
@AfterClass
106104
public static void dropDatabases(TestContext context) {
107-
if (createdDatabase) {
105+
if ( factoryManager.isStarted() ) {
108106
test( context, getSessionFactory()
109107
.withSession( session -> Arrays
110108
.stream( values() )

0 commit comments

Comments
 (0)