Skip to content

Commit

Permalink
added multiple sleep calls
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilal Al committed Sep 5, 2024
1 parent 354c345 commit f1c8a7f
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions client/src/test/java/io/split/client/SplitFactoryImplTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<Boolean> didTheThing(UserStorageWrapper userStorageWrapper) {
return new Callable<Boolean>() {
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);
Expand Down

0 comments on commit f1c8a7f

Please sign in to comment.