Author: brett
Date: Mon May  1 10:21:45 2006
New Revision: 398637

URL: http://svn.apache.org/viewcvs?rev=398637&view=rev
Log:
child delegation now available when not forking

Modified:
    
maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkConfiguration.java
    
maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooter.java

Modified: 
maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkConfiguration.java
URL: 
http://svn.apache.org/viewcvs/maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkConfiguration.java?rev=398637&r1=398636&r2=398637&view=diff
==============================================================================
--- 
maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkConfiguration.java
 (original)
+++ 
maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkConfiguration.java
 Mon May  1 10:21:45 2006
@@ -40,8 +40,6 @@
 
     private String forkMode;
 
-    private boolean childDelegation;
-
     private Properties systemProperties;
 
     private String jvmExecutable;
@@ -72,16 +70,6 @@
         {
             throw new IllegalArgumentException( "Fork mode " + forkMode + " is 
not a legal value" );
         }
-    }
-
-    public void setChildDelegation( boolean childDelegation )
-    {
-        this.childDelegation = childDelegation;
-    }
-
-    public boolean isChildDelegation()
-    {
-        return childDelegation;
     }
 
     public boolean isForking()

Modified: 
maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooter.java
URL: 
http://svn.apache.org/viewcvs/maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooter.java?rev=398637&r1=398636&r2=398637&view=diff
==============================================================================
--- 
maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooter.java
 (original)
+++ 
maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooter.java
 Mon May  1 10:21:45 2006
@@ -71,6 +71,8 @@
 
     private static Method assertionStatusMethod;
 
+    private boolean childDelegation = true;
+
     static
     {
         try
@@ -131,7 +133,7 @@
 
         if ( ForkConfiguration.FORK_NEVER.equals( 
forkConfiguration.getForkMode() ) )
         {
-            result = runSuitesInProcess( false );
+            result = runSuitesInProcess();
         }
         else if ( ForkConfiguration.FORK_ONCE.equals( 
forkConfiguration.getForkMode() ) )
         {
@@ -144,7 +146,7 @@
         return result;
     }
 
-    private boolean runSuitesInProcess( String testSet, boolean 
childDelegation, Properties results )
+    private boolean runSuitesInProcess( String testSet, Properties results )
         throws SurefireExecutionException
     {
         if ( testSuites.size() != 1 )
@@ -191,7 +193,7 @@
         }
     }
 
-    private boolean runSuitesInProcess( boolean childDelegation )
+    private boolean runSuitesInProcess()
         throws SurefireExecutionException
     {
         // TODO: replace with plexus
@@ -366,7 +368,7 @@
             properties.setProperty( "surefireClassPathUrl." + i, url );
         }
 
-        properties.setProperty( "childDelegation", String.valueOf( 
forkConfiguration.isChildDelegation() ) );
+        properties.setProperty( "childDelegation", String.valueOf( 
childDelegation ) );
     }
 
     private File writePropertiesFile( String name, Properties properties )
@@ -724,11 +726,11 @@
             boolean result;
             if ( testSet != null )
             {
-                result = surefireBooter.runSuitesInProcess( testSet, 
childDelegation, p );
+                result = surefireBooter.runSuitesInProcess( testSet, p );
             }
             else
             {
-                result = surefireBooter.runSuitesInProcess( childDelegation );
+                result = surefireBooter.runSuitesInProcess();
             }
 
             surefireBooter.writePropertiesFile( surefirePropertiesFile, 
"surefire", p );
@@ -746,5 +748,9 @@
         }
     }
 
+    public void setChildDelegation( boolean childDelegation )
+    {
+        this.childDelegation = childDelegation;
+    }
 }
 


Reply via email to