Skip to content

Commit 73c4226

Browse files
committed
[#478] Change assertions in MultipleContextTest
I'm not sure why but it fails with the latest JDK on CI otherwise.
1 parent f6c4f31 commit 73c4226

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public void testPersistWithStage(TestContext testContext) throws Exception {
6060
testContext.assertNotNull( e );
6161
testContext.assertEquals( CompletionException.class, e.getClass() );
6262
testContext.assertEquals( IllegalStateException.class, e.getCause().getClass() );
63-
testContext.assertTrue( e.getMessage().contains( ERROR_MESSAGE ) );
63+
testContext.assertEquals( ERROR_MESSAGE, e.getMessage() );
6464
return null;
6565
} ) )
6666
);
@@ -85,7 +85,7 @@ public void testFindWithStage(TestContext testContext) throws Exception {
8585
testContext.assertNotNull( e );
8686
testContext.assertEquals( CompletionException.class, e.getClass() );
8787
testContext.assertEquals( IllegalStateException.class, e.getCause().getClass() );
88-
testContext.assertTrue( e.getMessage().contains( ERROR_MESSAGE ) );
88+
testContext.assertEquals( ERROR_MESSAGE, e.getMessage() );
8989
return null;
9090
} ) )
9191
);
@@ -108,7 +108,7 @@ public void testOnPersistWithMutiny(TestContext testContext) throws Exception {
108108
.onItem().invoke( v -> testContext.fail( "We were expecting an exception" ) )
109109
.onFailure().recoverWithUni( e -> {
110110
testContext.assertEquals( IllegalStateException.class, e.getClass() );
111-
testContext.assertTrue( e.getMessage().contains( ERROR_MESSAGE ) );
111+
testContext.assertEquals( ERROR_MESSAGE, e.getMessage() );
112112
return Uni.createFrom().voidItem();
113113
} ) )
114114
);
@@ -131,7 +131,7 @@ public void testFindWithMutiny(TestContext testContext) throws Exception {
131131
.onItem().invoke( v -> testContext.fail( "We were expecting an exception" ) )
132132
.onFailure().recoverWithUni( e -> {
133133
testContext.assertEquals( IllegalStateException.class, e.getClass() );
134-
testContext.assertTrue( e.getMessage().contains( ERROR_MESSAGE ) );
134+
testContext.assertEquals( ERROR_MESSAGE, e.getMessage() );
135135
return Uni.createFrom().nullItem();
136136
} ) )
137137
);

0 commit comments

Comments
 (0)