Skip to content

Commit 08f15fb

Browse files
committed
wait for clusterStateProcessed
1 parent 087518e commit 08f15fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/test/java/org/elasticsearch/cluster/service/MasterServiceTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ public void onAckTimeout() {
754754

755755
// check that we timeout if commit took too long
756756
{
757-
final CountDownLatch latch = new CountDownLatch(1);
757+
final CountDownLatch latch = new CountDownLatch(2);
758758

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

@@ -783,7 +783,7 @@ public TimeValue timeout() {
783783

784784
@Override
785785
public void clusterStateProcessed(String source, ClusterState oldState, ClusterState newState) {
786-
// ok
786+
latch.countDown();
787787
}
788788

789789
@Override

0 commit comments

Comments
 (0)