Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellblazer committed Sep 23, 2023
1 parent 6dbbe23 commit e7f7b00
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ public Any ping(Any request) {
var scheduler = Executors.newSingleThreadScheduledExecutor();
var exec = Executors.newVirtualThreadPerTaskExecutor();
var slice = new SynchSliceIterator<TestItService>("Test Me", serverMember1, Arrays.asList(serverMember1, serverMember2), commsA, exec);
var countdown = new CountDownLatch(2);
var countdown = new CountDownLatch(1);
slice.iterate((link, member) -> link.ping(Any.getDefaultInstance()), (result, comms, member) -> true, () -> {
countdown.countDown();
}, Executors.newSingleThreadScheduledExecutor(), Duration.ofMillis(1));
boolean finished = countdown.await(1, TimeUnit.SECONDS);
boolean finished = countdown.await(3, TimeUnit.SECONDS);
assertTrue(finished, "completed: " + countdown.getCount());
assertFalse(pinged1.get());
assertTrue(pinged1.get());
assertTrue(pinged2.get());
}
}

0 comments on commit e7f7b00

Please sign in to comment.