From 14ba0c31b4a90595efdfa64f3de23904a354f1dc Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Mon, 28 Mar 2016 12:44:09 -0400 Subject: [PATCH] Use longer timeout on nightly tests, but rarely This commit increases the timeout while indexing during the acked indexing test when running nightly tests, but only rarely. --- .../discovery/DiscoveryWithServiceDisruptionsIT.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/test/java/org/elasticsearch/discovery/DiscoveryWithServiceDisruptionsIT.java b/core/src/test/java/org/elasticsearch/discovery/DiscoveryWithServiceDisruptionsIT.java index 68136709771..87ec2219859 100644 --- a/core/src/test/java/org/elasticsearch/discovery/DiscoveryWithServiceDisruptionsIT.java +++ b/core/src/test/java/org/elasticsearch/discovery/DiscoveryWithServiceDisruptionsIT.java @@ -448,6 +448,9 @@ public class DiscoveryWithServiceDisruptionsIT extends ESIntegTestCase { + "indices.recovery:TRACE,indices.cluster:TRACE") @AwaitsFix(bugUrl = "needs primary terms") public void testAckedIndexing() throws Exception { + + final String timeout = !(TEST_NIGHTLY && rarely()) ? "1s" : "5s"; + // TODO: add node count randomizaion final List nodes = startCluster(3); @@ -490,7 +493,8 @@ public class DiscoveryWithServiceDisruptionsIT extends ESIntegTestCase { id = Integer.toString(idGenerator.incrementAndGet()); int shard = MathUtils.mod(Murmur3HashFunction.hash(id), numPrimaries); logger.trace("[{}] indexing id [{}] through node [{}] targeting shard [{}]", name, id, node, shard); - IndexResponse response = client.prepareIndex("test", "type", id).setSource("{}").setTimeout("1s").get("1s"); + IndexResponse response = + client.prepareIndex("test", "type", id).setSource("{}").setTimeout(timeout).get(timeout); assertThat(response.getVersion(), equalTo(1L)); ackedDocs.put(id, node); logger.trace("[{}] indexed id [{}] through node [{}]", name, id, node);