diff --git a/test-framework/junit5/src/main/java/io/quarkus/test/junit/QuarkusTestExtension.java b/test-framework/junit5/src/main/java/io/quarkus/test/junit/QuarkusTestExtension.java index fd9153d2010fc..e64a8ace36a76 100644 --- a/test-framework/junit5/src/main/java/io/quarkus/test/junit/QuarkusTestExtension.java +++ b/test-framework/junit5/src/main/java/io/quarkus/test/junit/QuarkusTestExtension.java @@ -816,8 +816,13 @@ public void interceptTestMethod(Invocation invocation, ReflectiveInvocatio runExtensionMethod(invocationContext, extensionContext, true); invocation.skip(); } catch (Throwable t) { - for (var i : serverExceptions) { - t.addSuppressed(i); + for (var serverException : serverExceptions) { + if (t == serverException) { + // do not add a suppressed exception to itself + continue; + } + + t.addSuppressed(serverException); } throw t; } finally {