maven-surefire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dfabul...@apache.org
Subject svn commit: r652773 - in /maven/surefire/trunk: maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/ surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ surefire-integration-tests/src/test/resources/system-propertie...
Date Fri, 02 May 2008 05:58:55 GMT
Author: dfabulich
Date: Thu May  1 22:58:54 2008
New Revision: 652773

URL: http://svn.apache.org/viewvc?rev=652773&view=rev
Log:
[SUREFIRE-491] All system properties from Maven process are copied to forked Surefire process

Modified:
    maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SystemPropertiesTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/system-properties/src/test/java/systemProperties/BasicTest.java

Modified: maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java?rev=652773&r1=652772&r2=652773&view=diff
==============================================================================
--- maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
(original)
+++ maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
Thu May  1 22:58:54 2008
@@ -1020,12 +1020,15 @@
 
         originalSystemProperties = (Properties) System.getProperties().clone();
         
-        // SUREFIRE-121 overlay our system properties with user specified properties
-        // Is this wise? 
+        // We used to take all of our system properties and dump them in with the
+        // user specified properties for SUREFIRE-121, causing SUREFIRE-491.
+        // Not gonna do THAT any more... but I'm leaving this code here in case
+        // we need it later when we try to fix SUREFIRE-121 again.
+        
         // Get the properties from the MavenSession instance to make embedded use work correctly
         Properties userSpecifiedProperties = (Properties) session.getExecutionProperties().clone();
         userSpecifiedProperties.putAll( systemProperties );
-        systemProperties = userSpecifiedProperties;
+        //systemProperties = userSpecifiedProperties;
 
         systemProperties.setProperty( "basedir", basedir.getAbsolutePath() );
         systemProperties.setProperty( "user.dir", workingDirectory.getAbsolutePath() );

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SystemPropertiesTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SystemPropertiesTest.java?rev=652773&r1=652772&r2=652773&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SystemPropertiesTest.java
(original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SystemPropertiesTest.java
Thu May  1 22:58:54 2008
@@ -25,12 +25,13 @@
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
         ArrayList goals = new ArrayList();
         goals.add( "test" );
-        goals.add( "-DsetOnMavenCommandLine=baz" );
+        // SUREFIRE-121... someday we should re-enable this
+        // goals.add( "-DsetOnMavenCommandLine=baz" );
         verifier.executeGoals( goals );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
         
-        HelperAssertions.assertTestSuiteResults( 3, 0, 0, 0, testDir );        
+        HelperAssertions.assertTestSuiteResults( 2, 0, 0, 0, testDir );        
     }
     
     public void testSystemPropertiesNoFork()
@@ -42,13 +43,14 @@
         ArrayList goals = new ArrayList();
         goals.add( "test" );
         goals.add( "-DforkMode=never" );
-        goals.add( "-DsetOnMavenCommandLine=baz" );
+        // SUREFIRE-121... someday we should re-enable this
+        // goals.add( "-DsetOnMavenCommandLine=baz" );
         // DGF fake the argLine, since we're not forking
         goals.add( "-DsetOnArgLine=bar" );
         verifier.executeGoals( goals );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
 
-        HelperAssertions.assertTestSuiteResults( 3, 0, 0, 0, testDir );
+        HelperAssertions.assertTestSuiteResults( 2, 0, 0, 0, testDir );
     }
 }

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/resources/system-properties/src/test/java/systemProperties/BasicTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/system-properties/src/test/java/systemProperties/BasicTest.java?rev=652773&r1=652772&r2=652773&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/system-properties/src/test/java/systemProperties/BasicTest.java
(original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/system-properties/src/test/java/systemProperties/BasicTest.java
Thu May  1 22:58:54 2008
@@ -18,10 +18,11 @@
     {
         assertEquals("setOnArgLine property not set", "bar", System.getProperty("setOnArgLine"));
     }
-    
-    public void testSetOnMavenCommandLine()
-    {
-        assertEquals("property setOnMavenCommandLine not set", "baz", System.getProperty("setOnMavenCommandLine"));
-    }
+
+// SUREFIRE-121; someday we should re-enable this    
+//    public void testSetOnMavenCommandLine()
+//    {
+//        assertEquals("property setOnMavenCommandLine not set", "baz", System.getProperty("setOnMavenCommandLine"));
+//    }
     
 }



Mime
View raw message