diff --git a/modules/transport-netty4/src/internalClusterTest/java/org/elasticsearch/http/netty4/Netty4ChunkedContinuationsIT.java b/modules/transport-netty4/src/internalClusterTest/java/org/elasticsearch/http/netty4/Netty4ChunkedContinuationsIT.java index 5ad1152d65e85..21437c06c803d 100644 --- a/modules/transport-netty4/src/internalClusterTest/java/org/elasticsearch/http/netty4/Netty4ChunkedContinuationsIT.java +++ b/modules/transport-netty4/src/internalClusterTest/java/org/elasticsearch/http/netty4/Netty4ChunkedContinuationsIT.java @@ -72,8 +72,10 @@ import org.elasticsearch.tasks.Task; import org.elasticsearch.tasks.TaskCancelledException; import org.elasticsearch.test.MockLog; +import org.elasticsearch.test.ReachabilityChecker; import org.elasticsearch.test.junit.annotations.TestLogging; import org.elasticsearch.threadpool.ThreadPool; +import org.elasticsearch.transport.LeakTracker; import org.elasticsearch.transport.TransportService; import org.elasticsearch.transport.netty4.Netty4Utils; import org.elasticsearch.xcontent.ToXContentObject; @@ -315,14 +317,20 @@ public void onFailure(Exception exception) { private static Releasable withResourceTracker() { assertNull(refs); + final ReachabilityChecker reachabilityChecker = new ReachabilityChecker(); final var latch = new CountDownLatch(1); - refs = AbstractRefCounted.of(latch::countDown); + refs = LeakTracker.wrap(reachabilityChecker.register(AbstractRefCounted.of(latch::countDown))); return () -> { refs.decRef(); + boolean success = false; try { safeAwait(latch); + success = true; } finally { refs = null; + if (success == false) { + reachabilityChecker.ensureUnreachable(); + } } }; } diff --git a/muted-tests.yml b/muted-tests.yml index dc59d49a66c91..0733b1fb9c89f 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -78,9 +78,6 @@ tests: - class: org.elasticsearch.xpack.transform.transforms.TransformIndexerTests method: testMaxPageSearchSizeIsResetToConfiguredValue issue: https://github.com/elastic/elasticsearch/issues/109844 -- class: "org.elasticsearch.http.netty4.Netty4ChunkedContinuationsIT" - issue: "https://github.com/elastic/elasticsearch/issues/109866" - method: "testClientCancellation" - class: "org.elasticsearch.test.jvm_crash.JvmCrashIT" issue: "https://github.com/elastic/elasticsearch/issues/110052" method: "testJvmCrash"