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/07/20 23:30:32 UTC
[maven-surefire] branch SUREFIRE-1675 updated: fixed collisions
between test methods in ForkConfigurationTest
This is an automated email from the ASF dual-hosted git repository.
tibordigana pushed a commit to branch SUREFIRE-1675
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
The following commit(s) were added to refs/heads/SUREFIRE-1675 by this push:
new d619d9a fixed collisions between test methods in ForkConfigurationTest
d619d9a is described below
commit d619d9ae42e782e74043f8e1cf138136a13bbd0f
Author: tibordigana <ti...@apache.org>
AuthorDate: Sun Jul 21 01:30:22 2019 +0200
fixed collisions between test methods in ForkConfigurationTest
---
.../plugin/surefire/booterclient/ForkConfigurationTest.java | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkConfigurationTest.java b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkConfigurationTest.java
index 575c0fd..b1b70c0 100644
--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkConfigurationTest.java
+++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkConfigurationTest.java
@@ -20,7 +20,6 @@ package org.apache.maven.plugin.surefire.booterclient;
*/
import org.apache.commons.io.FileUtils;
-import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.SystemUtils;
import org.apache.maven.plugin.surefire.JdkAttributes;
import org.apache.maven.plugin.surefire.log.api.NullConsoleLogger;
@@ -55,6 +54,8 @@ public class ForkConfigurationTest
false,
false );
+ private static int idx = 0;
+
@Test
public void testCreateCommandLine_UseSystemClassLoaderForkOnce_ShouldConstructManifestOnlyJar()
throws IOException, SurefireBooterForkException
@@ -98,7 +99,7 @@ public class ForkConfigurationTest
{
// SUREFIRE-1136
File baseDir =
- new File( FileUtils.getTempDirectory(), "SUREFIRE-1136-" + RandomStringUtils.randomAlphabetic( 3 ) );
+ new File( FileUtils.getTempDirectory(), "SUREFIRE-1136-" + ++idx );
assertTrue( baseDir.mkdirs() );
baseDir.deleteOnExit();
@@ -124,7 +125,7 @@ public class ForkConfigurationTest
{
// SUREFIRE-1136
File baseDir =
- new File( FileUtils.getTempDirectory(), "SUREFIRE-1136-" + RandomStringUtils.randomAlphabetic( 3 ) );
+ new File( FileUtils.getTempDirectory(), "SUREFIRE-1136-" + ++idx );
assertTrue( baseDir.mkdirs() );
baseDir.deleteOnExit();
@@ -155,7 +156,7 @@ public class ForkConfigurationTest
{
// SUREFIRE-1136
File baseDir =
- new File( FileUtils.getTempDirectory(), "SUREFIRE-1136-" + RandomStringUtils.randomAlphabetic( 3 ) );
+ new File( FileUtils.getTempDirectory(), "SUREFIRE-1136-" + ++idx );
assertTrue( baseDir.mkdirs() );
baseDir.deleteOnExit();