Skip to content

Commit

Permalink
Increase assertAllCancellableTasksAreCancelled timeout (elastic#89744) (
Browse files Browse the repository at this point in the history
elastic#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
elastic#88884,
elastic#88201
  • Loading branch information
pxsalehi authored Aug 31, 2022
1 parent a94fbd7 commit a9b79a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.elasticsearch.core.TimeValue;
import org.elasticsearch.rest.RestStatus;
import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.junit.annotations.TestLogging;

import java.util.EnumSet;
import java.util.concurrent.CancellationException;
Expand All @@ -38,6 +39,7 @@
import static org.hamcrest.core.IsEqual.equalTo;

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

public void testGetMappingsCancellation() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.elasticsearch.transport.TransportService;

import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;

import static junit.framework.TestCase.assertTrue;
Expand Down Expand Up @@ -70,7 +71,7 @@ public static void assertAllCancellableTasksAreCancelled(String actionPrefix) th
}
}
assertTrue("found no cancellable tasks", foundTask);
});
}, 30, TimeUnit.SECONDS);
}

public static void assertAllTasksHaveFinished(String actionPrefix) throws Exception {
Expand Down

0 comments on commit a9b79a7

Please sign in to comment.