From ed47b7f487bafa48cff47f051af81a004cd36049 Mon Sep 17 00:00:00 2001 From: Marc Philipp Date: Mon, 6 May 2024 12:31:17 +0200 Subject: [PATCH] Disable test on JDK 16 and later --- .../junit/internal/runners/statements/FailOnTimeoutTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/java/org/junit/internal/runners/statements/FailOnTimeoutTest.java b/src/test/java/org/junit/internal/runners/statements/FailOnTimeoutTest.java index 8bf7823f30af..12cf7c58ec2b 100644 --- a/src/test/java/org/junit/internal/runners/statements/FailOnTimeoutTest.java +++ b/src/test/java/org/junit/internal/runners/statements/FailOnTimeoutTest.java @@ -184,6 +184,8 @@ private void notTheRealCauseOfTheTimeout() { @Test public void lookingForStuckThread_threadGroupNotLeaked() throws Throwable { assumeTrue(lookingForStuckThread); + assumeTrue("Thread groups can no longer be destroyed on JDK 16 and later", System.getProperty("java.vm.specification.version").compareTo("16") < 0); + final AtomicReference innerThreadGroup = new AtomicReference(); final AtomicReference innerThread = new AtomicReference(); final ThreadGroup outerThreadGroup = currentThread().getThreadGroup();