From 3a929c7aeac203fdcacbc2470bf6574ca116c97c Mon Sep 17 00:00:00 2001 From: Yannick Welsch Date: Fri, 11 Jan 2019 10:15:39 +0100 Subject: [PATCH] Increase assertBusy timeouts for RefreshListenersTests --- .../elasticsearch/index/shard/RefreshListenersTests.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/test/java/org/elasticsearch/index/shard/RefreshListenersTests.java b/server/src/test/java/org/elasticsearch/index/shard/RefreshListenersTests.java index fe1f4355c98..53c3e86ee01 100644 --- a/server/src/test/java/org/elasticsearch/index/shard/RefreshListenersTests.java +++ b/server/src/test/java/org/elasticsearch/index/shard/RefreshListenersTests.java @@ -72,6 +72,7 @@ import java.util.Collections; import java.util.List; import java.util.Locale; import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Consumer; @@ -264,7 +265,6 @@ public class RefreshListenersTests extends ESTestCase { * adding listeners. This can catch the situation where a refresh happens right as the listener is being added such that the listener * misses the refresh and has to catch the next one. If the listener wasn't able to properly catch the next one then this would fail. */ - @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/37261") public void testConcurrentRefresh() throws Exception { AtomicBoolean run = new AtomicBoolean(true); Thread refresher = new Thread(() -> { @@ -281,7 +281,7 @@ public class RefreshListenersTests extends ESTestCase { if (immediate) { assertNotNull(listener.forcedRefresh.get()); } else { - assertBusy(() -> assertNotNull(listener.forcedRefresh.get())); + assertBusy(() -> assertNotNull(listener.forcedRefresh.get()), 1, TimeUnit.MINUTES); } assertFalse(listener.forcedRefresh.get()); listener.assertNoError(); @@ -316,7 +316,7 @@ public class RefreshListenersTests extends ESTestCase { DummyRefreshListener listener = new DummyRefreshListener(); listeners.addOrNotify(index.getTranslogLocation(), listener); - assertBusy(() -> assertNotNull("listener never called", listener.forcedRefresh.get())); + assertBusy(() -> assertNotNull("listener never called", listener.forcedRefresh.get()), 1, TimeUnit.MINUTES); if (threadCount < maxListeners) { assertFalse(listener.forcedRefresh.get()); }