Skip to content

Commit b35b5c9

Browse files
committed
HHH-19772 change tests, after change in semantics after HHH-19737
1 parent 90e10e4 commit b35b5c9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

hibernate-envers/src/test/java/org/hibernate/envers/test/integration/tm/SessionFactoryInterceptorTransactionTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ public void initData() throws Exception {
6666

6767
@Test
6868
public void testInterceptorInvocations() throws Exception {
69-
// Expect the interceptor to have been created once and invoked twice, once for the original session
70-
// and follow-up for the Envers temporary session.
69+
// The interceptor should only be created once and should only be invoked twice
70+
// Once for the original session, and follow-up for the Envers temporary session
7171
final Map<TestInterceptor, Integer> invocationMap = TestInterceptor.getBeforeCompletionCallbacks();
7272
assertEquals( 1, invocationMap.size() );
73-
assertEquals( invocationMap.values().stream().filter( v -> v == 2 ).count(), 1 );
73+
invocationMap.values().forEach( c -> assertEquals( 2, c.intValue() ) );
7474
}
7575
}

hibernate-envers/src/test/java/org/hibernate/envers/test/integration/tm/SessionInterceptorTransactionTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ public void initData() throws Exception {
6363
}
6464

6565
@Test
66-
public void testInterceptorInvocations() throws Exception {
67-
// The interceptor should only be created once and should only be invoked once.
66+
public void testInterceptorInvocations() {
67+
// The interceptor should be created one and should only be invoked once
6868
final Map<TestInterceptor, Integer> invocationMap = TestInterceptor.getBeforeCompletionCallbacks();
6969
assertEquals( 1, invocationMap.size() );
70-
assertEquals( invocationMap.values().stream().filter( v -> v == 1 ).count(), 1 );
70+
invocationMap.values().forEach( c -> assertEquals( 1, c.intValue() ) );
7171
}
7272
}

0 commit comments

Comments
 (0)