diff --git a/client/src/test/java/io/split/client/SplitFactoryImplTest.java b/client/src/test/java/io/split/client/SplitFactoryImplTest.java index 4cf9d896..0eaaf9ad 100644 --- a/client/src/test/java/io/split/client/SplitFactoryImplTest.java +++ b/client/src/test/java/io/split/client/SplitFactoryImplTest.java @@ -220,26 +220,13 @@ public void testFactoryConsumerInstantiationRetryReadiness() throws Exception { modifiersField.setAccessible(true); modifiersField.setInt(splitFactoryImpl, splitFactoryImpl.getModifiers() & ~Modifier.FINAL); splitFactoryImpl.set(splitFactory, userStorageWrapper); + Thread.sleep(2000); assertNotNull(splitFactory.client()); assertNotNull(splitFactory.manager()); -// await().atMost(3, TimeUnit.SECONDS).until(didTheThing(userStorageWrapper)); - Thread.sleep(2000); + Thread.sleep(1000); Mockito.verify(userStorageWrapper, Mockito.times(2)).connect(); } - /* - private Callable didTheThing(UserStorageWrapper userStorageWrapper) { - return new Callable() { - public Boolean call() throws Exception { - while (!Mockito.verify(userStorageWrapper, Mockito.times(2)).connect()) { - Thread.sleep(3000); - } - return true; - } - }; - } - */ - @Test public void testFactoryConsumerDestroy() throws NoSuchFieldException, URISyntaxException, IllegalAccessException { CustomStorageWrapper customStorageWrapper = Mockito.mock(CustomStorageWrapper.class);