|
@@ -18,9 +18,11 @@ import org.elasticsearch.cluster.ClusterState;
|
|
|
import org.elasticsearch.cluster.ClusterStateUpdateTask;
|
|
|
import org.elasticsearch.cluster.service.ClusterService;
|
|
|
import org.elasticsearch.common.Priority;
|
|
|
+import org.elasticsearch.test.junit.annotations.TestIssueLogging;
|
|
|
|
|
|
import java.util.concurrent.CancellationException;
|
|
|
import java.util.concurrent.CyclicBarrier;
|
|
|
+import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
import static org.elasticsearch.action.support.ActionTestUtils.wrapAsRestResponseListener;
|
|
|
import static org.elasticsearch.test.TaskAssertions.assertAllCancellableTasksAreCancelled;
|
|
@@ -28,6 +30,10 @@ import static org.elasticsearch.test.TaskAssertions.awaitTaskWithPrefixOnMaster;
|
|
|
|
|
|
public class ClusterHealthRestCancellationIT extends HttpSmokeTestCase {
|
|
|
|
|
|
+ @TestIssueLogging(
|
|
|
+ issueUrl = "https://github.com/elastic/elasticsearch/issues/100062",
|
|
|
+ value = "org.elasticsearch.test.TaskAssertions:TRACE"
|
|
|
+ )
|
|
|
public void testClusterHealthRestCancellation() throws Exception {
|
|
|
|
|
|
final var barrier = new CyclicBarrier(2);
|
|
@@ -37,7 +43,18 @@ public class ClusterHealthRestCancellationIT extends HttpSmokeTestCase {
|
|
|
@Override
|
|
|
public ClusterState execute(ClusterState currentState) {
|
|
|
safeAwait(barrier);
|
|
|
- safeAwait(barrier);
|
|
|
+ // safeAwait(barrier);
|
|
|
+
|
|
|
+ // temporarily lengthen timeout on safeAwait while investigating #100062
|
|
|
+ try {
|
|
|
+ barrier.await(60, TimeUnit.SECONDS);
|
|
|
+ } catch (InterruptedException e) {
|
|
|
+ Thread.currentThread().interrupt();
|
|
|
+ throw new AssertionError("unexpected", e);
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new AssertionError("unexpected", e);
|
|
|
+ }
|
|
|
+
|
|
|
return currentState;
|
|
|
}
|
|
|
|