From de85c2e3322867d82194ccd75aa64697db3ef245 Mon Sep 17 00:00:00 2001 From: Flavia Rainone Date: Sun, 19 Sep 2021 19:54:43 -0300 Subject: [PATCH] [SUREFIRE-1946] At ForkStarter.fork, treat the case forkClient.isErrorInFork --- .../maven/plugin/surefire/booterclient/ForkStarter.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java index a999069804..c2a74a4071 100644 --- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java +++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java @@ -653,6 +653,12 @@ private RunResult fork( Object testSet, PropertiesWrapper providerProperties, Fo { runResult = timeout( reporter.getGlobalRunStatistics().getRunResult() ); } + else if ( forkClient.isErrorInFork() ) + { + final StackTraceWriter stackTrace = forkClient.getErrorInFork(); + booterForkException = + new SurefireBooterForkException( stackTrace.writeTraceToString() ); + } else if ( result != SUCCESS ) { booterForkException =