From 33e49a55f7dd2176d8870e758a3a74394fc93bc7 Mon Sep 17 00:00:00 2001 From: Boaz Leskes Date: Mon, 16 Dec 2013 10:02:24 +0100 Subject: [PATCH] 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. --- .../java/org/elasticsearch/cluster/ClusterServiceTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/elasticsearch/cluster/ClusterServiceTests.java b/src/test/java/org/elasticsearch/cluster/ClusterServiceTests.java index 160cf254944..b93f7a1797a 100644 --- a/src/test/java/org/elasticsearch/cluster/ClusterServiceTests.java +++ b/src/test/java/org/elasticsearch/cluster/ClusterServiceTests.java @@ -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));