Skip to content

Commit

Permalink
wait for clusterStateProcessed
Browse files Browse the repository at this point in the history
  • Loading branch information
ywelsch committed Jun 14, 2018
1 parent 087518e commit 08f15fb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ public void onAckTimeout() {

// check that we timeout if commit took too long
{
final CountDownLatch latch = new CountDownLatch(1);
final CountDownLatch latch = new CountDownLatch(2);

final TimeValue ackTimeout = TimeValue.timeValueMillis(randomInt(100));

Expand Down Expand Up @@ -783,7 +783,7 @@ public TimeValue timeout() {

@Override
public void clusterStateProcessed(String source, ClusterState oldState, ClusterState newState) {
// ok
latch.countDown();
}

@Override
Expand Down

0 comments on commit 08f15fb

Please sign in to comment.