File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
client/src/test/java/io/split/client Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 88import io .split .telemetry .storage .TelemetryStorage ;
99import io .split .telemetry .synchronizer .TelemetrySynchronizer ;
1010import junit .framework .TestCase ;
11+ import org .awaitility .Awaitility ;
1112import org .junit .Assert ;
1213import org .junit .Ignore ;
1314import org .junit .Test ;
2324import java .lang .reflect .Method ;
2425import java .lang .reflect .Modifier ;
2526import java .net .URISyntaxException ;
27+ import java .util .concurrent .TimeUnit ;
2628
2729
2830public class SplitFactoryImplTest extends TestCase {
@@ -197,7 +199,10 @@ public void testFactoryConsumerInstantiationRetryReadiness() throws Exception {
197199 splitFactoryImpl .set (splitFactory , userStorageWrapper );
198200 assertNotNull (splitFactory .client ());
199201 assertNotNull (splitFactory .manager ());
200- Thread .sleep (2000 );
202+ Awaitility .await ()
203+ .atMost (5L , TimeUnit .SECONDS )
204+ .untilAsserted (() -> Assert .assertTrue (userStorageWrapper .connect ()));
205+
201206 Mockito .verify (userStorageWrapper , Mockito .times (2 )).connect ();
202207 }
203208
You can’t perform that action at this time.
0 commit comments