Skip to content

Commit a9b79a7

Browse files
authored
Increase assertAllCancellableTasksAreCancelled timeout (#89744) (#89749)
The following two failures happen rarely, but both fail in the same `assertBusy` block. I don't have a clue why, and couldn't reproduce them. Considering the amount of checks in that block, maybe a larger timeout is more suitable. (Also it seems from the test history, it is not uncommon for those tests to take 2-3s, so every few thousand runs hitting the 10s timeout seems likely, IMO!) Relates #88884, #88201
1 parent a94fbd7 commit a9b79a7

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

qa/smoke-test-http/src/javaRestTest/java/org/elasticsearch/http/RestClusterInfoActionCancellationIT.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import org.elasticsearch.core.TimeValue;
2727
import org.elasticsearch.rest.RestStatus;
2828
import org.elasticsearch.test.ESIntegTestCase;
29+
import org.elasticsearch.test.junit.annotations.TestLogging;
2930

3031
import java.util.EnumSet;
3132
import java.util.concurrent.CancellationException;
@@ -38,6 +39,7 @@
3839
import static org.hamcrest.core.IsEqual.equalTo;
3940

4041
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, numClientNodes = 0)
42+
@TestLogging(value = "org.elasticsearch.tasks.TaskManager:TRACE,org.elasticsearch.test.TaskAssertions:TRACE", reason = "debugging")
4143
public class RestClusterInfoActionCancellationIT extends HttpSmokeTestCase {
4244

4345
public void testGetMappingsCancellation() throws Exception {

test/framework/src/main/java/org/elasticsearch/test/TaskAssertions.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import org.elasticsearch.transport.TransportService;
1818

1919
import java.util.List;
20+
import java.util.concurrent.TimeUnit;
2021
import java.util.stream.Collectors;
2122

2223
import static junit.framework.TestCase.assertTrue;
@@ -70,7 +71,7 @@ public static void assertAllCancellableTasksAreCancelled(String actionPrefix) th
7071
}
7172
}
7273
assertTrue("found no cancellable tasks", foundTask);
73-
});
74+
}, 30, TimeUnit.SECONDS);
7475
}
7576

7677
public static void assertAllTasksHaveFinished(String actionPrefix) throws Exception {

0 commit comments

Comments
 (0)