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 2018/09/11 03:03:04 UTC
[maven-surefire] branch master updated: build fix
Surefire1295AttributeJvmCrashesToTestsIT
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 134affa build fix Surefire1295AttributeJvmCrashesToTestsIT
134affa is described below
commit 134affaf82231deb41c97877a5c57c8bdddd1e93
Author: Tibor17 <ti...@apache.org>
AuthorDate: Tue Sep 11 05:02:48 2018 +0200
build fix Surefire1295AttributeJvmCrashesToTestsIT
---
.../its/jiras/Surefire1295AttributeJvmCrashesToTestsIT.java | 8 ++++----
.../src/test/java/junit44/environment/Test1CrashedTest.java | 5 ++++-
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1295AttributeJvmCrashesToTestsIT.java b/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1295AttributeJvmCrashesToTestsIT.java
index f756816..14ecb34 100644
--- a/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1295AttributeJvmCrashesToTestsIT.java
+++ b/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1295AttributeJvmCrashesToTestsIT.java
@@ -66,11 +66,11 @@ public class Surefire1295AttributeJvmCrashesToTestsIT
public static Iterable<Object[]> parameters()
{
return asList(new Object[][] {
-// unused, exit() does not stop all Threads immediately,
+// exit() does not stop all Threads immediately,
// see https://github.com/michaeltandy/crashjvm/issues/1
-// { "exit", DEFAULT },
-// { "exit", ONE_FORK_NO_REUSE },
-// { "exit", ONE_FORK_REUSE },
+ { "exit", DEFAULT },
+ { "exit", ONE_FORK_NO_REUSE },
+ { "exit", ONE_FORK_REUSE },
{ "abort", DEFAULT },
{ "abort", ONE_FORK_NO_REUSE },
{ "abort", ONE_FORK_REUSE },
diff --git a/surefire-its/src/test/resources/crash-during-test/src/test/java/junit44/environment/Test1CrashedTest.java b/surefire-its/src/test/resources/crash-during-test/src/test/java/junit44/environment/Test1CrashedTest.java
index 28fe637..446e930 100644
--- a/surefire-its/src/test/resources/crash-during-test/src/test/java/junit44/environment/Test1CrashedTest.java
+++ b/surefire-its/src/test/resources/crash-during-test/src/test/java/junit44/environment/Test1CrashedTest.java
@@ -19,6 +19,7 @@ package junit44.environment;
* under the License.
*/
+import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static org.junit.Assert.*;
import org.junit.Test;
import uk.me.mjt.CrashJvm;
@@ -26,8 +27,10 @@ import uk.me.mjt.CrashJvm;
public class Test1CrashedTest
{
@Test
- public void testCrashJvm()
+ public void testCrashJvm() throws Exception
{
+ MILLISECONDS.sleep( 1500L );
+
assertTrue(CrashJvm.loadedOk());
String crashType = System.getProperty("crashType");