From 13103ee74ae88b8ad4610057df127e485389fb9a Mon Sep 17 00:00:00 2001 From: Stuart Douglas Date: Tue, 30 May 2023 09:16:27 +1000 Subject: [PATCH] Don't set the TCCL before every test This prevents extensions from modifying the TCCL. The correct TCCL is set at the start of the run. --- .../io/quarkus/deployment/dev/testing/JunitTestRunner.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/JunitTestRunner.java b/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/JunitTestRunner.java index ee468ee0a929e..51fddadc5f53a 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/JunitTestRunner.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/JunitTestRunner.java @@ -235,10 +235,6 @@ public void executionStarted(TestIdentifier testIdentifier) { startTimes.put(testIdentifier, System.currentTimeMillis()); String testClassName = ""; Class testClass = getTestClassFromSource(testIdentifier.getSource()); - if (testClass != null) { - testClassName = testClass.getName(); - Thread.currentThread().setContextClassLoader(testClass.getClassLoader()); - } for (TestRunListener listener : listeners) { listener.testStarted(testIdentifier, testClassName); }