From 1069ad9fad932152f3067a2d5cf925f7eb670dba Mon Sep 17 00:00:00 2001 From: xuzha Date: Mon, 19 Oct 2015 12:06:20 -0700 Subject: [PATCH] fix a test bug --- .../discovery/gce/RetryHttpInitializerWrapperTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/discovery-gce/src/test/java/org/elasticsearch/discovery/gce/RetryHttpInitializerWrapperTests.java b/plugins/discovery-gce/src/test/java/org/elasticsearch/discovery/gce/RetryHttpInitializerWrapperTests.java index 73964b1bd7b..300a89cf673 100644 --- a/plugins/discovery-gce/src/test/java/org/elasticsearch/discovery/gce/RetryHttpInitializerWrapperTests.java +++ b/plugins/discovery-gce/src/test/java/org/elasticsearch/discovery/gce/RetryHttpInitializerWrapperTests.java @@ -113,7 +113,7 @@ public class RetryHttpInitializerWrapperTests { @Test public void testRetryWaitTooLong() throws Exception { - int maxWait = 50; + int maxWait = 10; FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport(HttpStatusCodes.STATUS_CODE_SERVER_ERROR, 50); @@ -124,7 +124,7 @@ public class RetryHttpInitializerWrapperTests { MockSleeper oneTimeSleeper = new MockSleeper() { @Override public void sleep(long millis) throws InterruptedException { - Thread.sleep(maxWait); + Thread.sleep(maxWait * 10); super.sleep(0); // important number, use this to get count } };