[TEST] only mark the event as processed when its out of its execution
This commit is contained in:
parent
2a69ae2f0d
commit
045ce097c9
|
@ -435,10 +435,9 @@ public class ClusterServiceTests extends ElasticsearchIntegrationTest {
|
|||
invoked1.await();
|
||||
final CountDownLatch invoked2 = new CountDownLatch(9);
|
||||
for (int i = 2; i <= 10; i++) {
|
||||
clusterService.submitStateUpdateTask(Integer.toString(i), new ClusterStateUpdateTask() {
|
||||
clusterService.submitStateUpdateTask(Integer.toString(i), new ProcessedClusterStateUpdateTask() {
|
||||
@Override
|
||||
public ClusterState execute(ClusterState currentState) {
|
||||
invoked2.countDown();
|
||||
return currentState;
|
||||
}
|
||||
|
||||
|
@ -446,6 +445,11 @@ public class ClusterServiceTests extends ElasticsearchIntegrationTest {
|
|||
public void onFailure(String source, Throwable t) {
|
||||
fail();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clusterStateProcessed(String source, ClusterState oldState, ClusterState newState) {
|
||||
invoked2.countDown();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue