File tree 1 file changed +4
-2
lines changed
spring-core/src/test/java/org/springframework/core
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 29
29
import org .springframework .util .ConcurrentReferenceHashMap ;
30
30
31
31
import static org .assertj .core .api .Assertions .assertThat ;
32
+ import static org .assertj .core .api .Assertions .assertThatNoException ;
32
33
import static org .assertj .core .api .Assertions .assertThatThrownBy ;
33
34
import static org .junit .jupiter .api .condition .JRE .JAVA_18 ;
34
35
@@ -107,8 +108,9 @@ void concurrentReferenceHashMapSegmentClear() {
107
108
}
108
109
}, future2 );
109
110
110
- CompletableFuture .allOf (future1 , future2 ).join ();
111
- assertThat (map ).isEmpty ();
111
+ //ensure blockhound doesn't trigger
112
+ final CompletableFuture <Void > allOf = CompletableFuture .allOf (future1 , future2 );
113
+ assertThatNoException ().isThrownBy (allOf ::join );
112
114
}
113
115
114
116
private void testNonBlockingTask (NonBlockingTask task ) {
You can’t perform that action at this time.
0 commit comments