continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcconn...@apache.org
Subject svn commit: r467362 - /maven/continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
Date Tue, 24 Oct 2006 15:41:43 GMT
Author: jmcconnell
Date: Tue Oct 24 08:41:43 2006
New Revision: 467362

URL: http://svn.apache.org/viewvc?view=rev&rev=467362
Log:
continuum-968 phillipe faes found out that the intermittent release failure was coming from
an ordering issue in the two unit tests for this functionality.  Turns out that there really
shouldn't be two unit tests but they should be combined since they are functionally one test
and junit's random test execution expresses the error

Modified:
    maven/continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java

Modified: maven/continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java?view=diff&rev=467362&r1=467361&r2=467362
==============================================================================
--- maven/continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
(original)
+++ maven/continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
Tue Oct 24 08:41:43 2006
@@ -72,12 +72,15 @@
         {
             releaseManager = (ContinuumReleaseManager) lookup( ContinuumReleaseManager.ROLE
);
         }
+        File scmPath = new File( getBasedir(), "target/scm-src" ).getAbsoluteFile();
+        File scmTargetPath = new File( getBasedir(), "target/scm-test" ).getAbsoluteFile();
+        FileUtils.copyDirectoryStructure(scmPath, scmTargetPath);
     }
 
-    public void testReleaseSimpleProject()
+    public void releaseSimpleProject()
         throws Exception
     {
-        String scmPath = new File( getBasedir(), "target/scm-src" ).getAbsolutePath().replace(
'\\', '/' );
+    	String scmPath = new File( getBasedir(), "target/scm-test" ).getAbsolutePath().replace(
'\\', '/' );
         File workDir = new File( getBasedir(), "target/test-classes/work-dir" );
         FileUtils.deleteDirectory( workDir );
         File testDir = new File( getBasedir(), "target/test-classes/test-dir" );
@@ -107,11 +110,16 @@
         pom = FileUtils.fileRead( new File( testDir, "pom.xml" ) );
         assertTrue( "Test released version", pom.indexOf( "<version>1.0</version>"
) > 0 );
     }
-
-    public void testReleaseSimpleProjectWithNextVersion()
+    
+    public void testReleases() throws Exception{
+    	releaseSimpleProject();
+    	releaseSimpleProjectWithNextVersion();
+    }
+    
+    public void releaseSimpleProjectWithNextVersion()
         throws Exception
     {
-        String scmPath = new File( getBasedir(), "target/scm-src" ).getAbsolutePath().replace(
'\\', '/' );
+        String scmPath = new File( getBasedir(), "target/scm-test" ).getAbsolutePath().replace(
'\\', '/' );
         File workDir = new File( getBasedir(), "target/test-classes/work-dir" );
         FileUtils.deleteDirectory( workDir );
         File testDir = new File( getBasedir(), "target/test-classes/test-dir" );



Mime
View raw message