You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2019/12/22 11:25:07 UTC
[maven-surefire] branch cli updated: in case the JVM prins the
error to the std/out
This is an automated email from the ASF dual-hosted git repository.
tibordigana pushed a commit to branch cli
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
The following commit(s) were added to refs/heads/cli by this push:
new 5ecaf91 in case the JVM prins the error to the std/out
5ecaf91 is described below
commit 5ecaf91ff3a1167a226ad66dfddb0d29c600dcb1
Author: tibordigana <ti...@apache.org>
AuthorDate: Sun Dec 22 12:24:58 2019 +0100
in case the JVM prins the error to the std/out
---
.../jiras/Surefire735ForkFailWithRedirectConsoleOutputIT.java | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire735ForkFailWithRedirectConsoleOutputIT.java b/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire735ForkFailWithRedirectConsoleOutputIT.java
index da7ba9b..3a08f07 100644
--- a/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire735ForkFailWithRedirectConsoleOutputIT.java
+++ b/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire735ForkFailWithRedirectConsoleOutputIT.java
@@ -19,6 +19,7 @@ package org.apache.maven.surefire.its.jiras;
* under the License.
*/
+import org.apache.maven.it.VerificationException;
import org.apache.maven.surefire.its.fixture.OutputValidator;
import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase;
import org.apache.maven.surefire.its.fixture.SurefireLauncher;
@@ -26,8 +27,10 @@ import org.junit.Test;
import java.io.File;
import java.io.FilenameFilter;
+import java.util.List;
import static org.fest.assertions.Assertions.assertThat;
+import static org.hamcrest.Matchers.containsString;
/**
* @author Kristian Rosenvold
@@ -59,9 +62,15 @@ public class Surefire735ForkFailWithRedirectConsoleOutputIT
return unpack( "fork-fail" );
}
- private static void assertJvmCrashed( OutputValidator outputValidator )
+ private static void assertJvmCrashed( OutputValidator outputValidator ) throws VerificationException
{
File reportDir = outputValidator.getSurefireReportsDirectory();
+ List<String> lines =
+ outputValidator.loadLogLines( containsString( "Invalid maximum heap size: -Xmxxxx712743m" ) );
+ if ( !lines.isEmpty() )
+ {
+ return;
+ }
String[] dumpFiles = reportDir.list( new FilenameFilter()
{
@Override