File tree Expand file tree Collapse file tree 3 files changed +5
-0
lines changed
src/test/java/io/rsocket/core Expand file tree Collapse file tree 3 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ subprojects {
47
47
ext[' assertj.version' ] = ' 3.21.0'
48
48
ext[' netflix.limits.version' ] = ' 0.3.6'
49
49
ext[' bouncycastle-bcpkix.version' ] = ' 1.68'
50
+ ext[' awaitility.version' ] = ' 4.1.1'
50
51
51
52
group = " io.rsocket"
52
53
@@ -80,6 +81,7 @@ subprojects {
80
81
dependency " org.assertj:assertj-core:${ ext['assertj.version']} "
81
82
dependency " org.hdrhistogram:HdrHistogram:${ ext['hdrhistogram.version']} "
82
83
dependency " org.slf4j:slf4j-api:${ ext['slf4j.version']} "
84
+ dependency " org.awaitility:awaitility:${ ext['awaitility.version']} "
83
85
dependencySet(group : ' org.mockito' , version : ext[' mockito.version' ]) {
84
86
entry ' mockito-junit-jupiter'
85
87
entry ' mockito-core'
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ dependencies {
35
35
testImplementation ' org.junit.jupiter:junit-jupiter-api'
36
36
testImplementation ' org.junit.jupiter:junit-jupiter-params'
37
37
testImplementation ' org.mockito:mockito-core'
38
+ testImplementation ' org.awaitility:awaitility'
38
39
39
40
testRuntimeOnly ' ch.qos.logback:logback-classic'
40
41
testRuntimeOnly ' org.junit.jupiter:junit-jupiter-engine'
Original file line number Diff line number Diff line change 17
17
package io .rsocket .core ;
18
18
19
19
import static org .assertj .core .api .Assertions .assertThat ;
20
+ import static org .awaitility .Awaitility .await ;
20
21
21
22
import io .rsocket .RaceTestConstants ;
22
23
import io .rsocket .internal .subscriber .AssertSubscriber ;
@@ -321,6 +322,7 @@ public String get() {
321
322
322
323
assertThat (expired ).hasSize (1 ).containsOnly ("value_to_expire" + i );
323
324
if (reconnectMono .resolvingInner .subscribers == ResolvingOperator .READY ) {
325
+ await ().atMost (Duration .ofSeconds (5 )).until (() -> received .size () == 2 );
324
326
assertThat (received )
325
327
.hasSize (2 )
326
328
.containsExactly (
You can’t perform that action at this time.
0 commit comments