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/11/19 01:23:13 UTC
[maven-surefire] branch master updated: fixed unstable build #102
with CheckTestNgExecuteErrorIT.java
This is an automated email from the ASF dual-hosted git repository.
tibordigana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
The following commit(s) were added to refs/heads/master by this push:
new cdbd5ce fixed unstable build #102 with CheckTestNgExecuteErrorIT.java
cdbd5ce is described below
commit cdbd5cecd27002877eb82dd367b787932efca8d7
Author: tibordigana <ti...@apache.org>
AuthorDate: Tue Nov 19 02:23:00 2019 +0100
fixed unstable build #102 with CheckTestNgExecuteErrorIT.java
---
.../surefire/its/CheckTestNgExecuteErrorIT.java | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/surefire-its/src/test/java/org/apache/maven/surefire/its/CheckTestNgExecuteErrorIT.java b/surefire-its/src/test/java/org/apache/maven/surefire/its/CheckTestNgExecuteErrorIT.java
index 8582753..dde0bea 100644
--- a/surefire-its/src/test/java/org/apache/maven/surefire/its/CheckTestNgExecuteErrorIT.java
+++ b/surefire-its/src/test/java/org/apache/maven/surefire/its/CheckTestNgExecuteErrorIT.java
@@ -26,6 +26,7 @@ import org.junit.Test;
import java.io.File;
import java.io.FilenameFilter;
+import static java.util.Objects.requireNonNull;
import static org.fest.assertions.Assertions.assertThat;
@@ -41,15 +42,16 @@ public class CheckTestNgExecuteErrorIT
{
@Test
public void executionError()
- throws Exception
{
OutputValidator outputValidator = unpack( "/testng-execute-error" )
- .maven()
- .sysProp( "testNgVersion", "5.7" )
- .sysProp( "testNgClassifier", "jdk15" )
- .showErrorStackTraces()
- .withFailure()
- .executeTest();
+ .maven()
+ .sysProp( "testNgVersion", "5.7" )
+ .sysProp( "testNgClassifier", "jdk15" )
+ .showErrorStackTraces()
+ .withFailure()
+ .executeTest()
+ .verifyTextInLog( "Cyclic graph of methods" )
+ .verifyTextInLog( "at org.apache.maven.surefire.testng.TestNGExecutor.run" );
File reportDir = outputValidator.getSurefireReportsDirectory();
String[] dumpFiles = reportDir.list( new FilenameFilter()
@@ -60,13 +62,15 @@ public class CheckTestNgExecuteErrorIT
return name.endsWith( "-jvmRun1.dump" );
}
} );
+
assertThat( dumpFiles )
.isNotNull()
.isNotEmpty();
- for ( String dump : dumpFiles )
+
+ for ( String dump : requireNonNull( dumpFiles ) )
{
outputValidator.getSurefireReportsFile( dump )
- .assertContainsText( "at org.apache.maven.surefire.testng.TestNGExecutor.run" );
+ .assertContainsText( "Cyclic graph of methods" );
}
}
}