Increased timeout in ClusterServiceTests.testTimeoutUpdateTask to 100ms

The previous 2ms timeout was too small and caused a racing condition in timeout handling. This will be fixed but requires more work.
This commit is contained in:
Boaz Leskes 2013-12-16 10:02:24 +01:00
parent a668cd22d8
commit 33e49a55f7
1 changed files with 2 additions and 2 deletions

View File

@ -83,7 +83,7 @@ public class ClusterServiceTests extends ElasticsearchIntegrationTest {
clusterService1.submitStateUpdateTask("test2", new TimeoutClusterStateUpdateTask() {
@Override
public TimeValue timeout() {
return TimeValue.timeValueMillis(2);
return TimeValue.timeValueMillis(100);
}
@Override
@ -102,7 +102,7 @@ public class ClusterServiceTests extends ElasticsearchIntegrationTest {
}
});
assertThat(timedOut.await(500, TimeUnit.MILLISECONDS), equalTo(true));
assertThat(timedOut.await(1000, TimeUnit.MILLISECONDS), equalTo(true));
block.countDown();
Thread.sleep(100); // sleep a bit to double check that execute on the timed out update task is not called...
assertThat(executeCalled.get(), equalTo(false));