Browse Source

Increase assertBusy timeouts for RefreshListenersTests

Yannick Welsch 6 years ago
parent
commit
3a929c7aea

+ 3 - 3
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());
                         }