continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r918282 - /continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
Date Wed, 03 Mar 2010 00:20:14 GMT
Author: brett
Date: Wed Mar  3 00:20:14 2010
New Revision: 918282

URL: http://svn.apache.org/viewvc?rev=918282&view=rev
Log:
don't fail test immediately after trying again, as it may have succeeded on the last attempt.
Increase threshold to 2 minutes + refresh time

Modified:
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java?rev=918282&r1=918281&r2=918282&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
Wed Mar  3 00:20:14 2010
@@ -371,44 +371,42 @@
         throws Exception
     {
         int currentIt = 1;
-        int maxIt = 10;
+        int maxIt = 120; // 2 minutes each, not including refresh time
         showProjectGroup( projectGroupName, groupId, description );
         clickButtonWithValue( "Build all projects" );
-        
+
+        int refreshInterval = 1000;
         Thread.sleep( 10000 );
         getSelenium().refresh();
         
         // check if project group is updating from SCM
         while ( isElementPresent( "//td/img[@alt='Updating']" ) )
-           {
-            Thread.sleep( 10000 );
+        {
+            Thread.sleep( refreshInterval );
             getSelenium().refresh();
             waitPage();
+            currentIt++;
             if ( currentIt > maxIt )
-                {
+            {
                 Assert.fail( "Timeout, Can't update project group from SCM" );
-                }
-            currentIt++;
-           }
-        
+            }
+        }
+
         currentIt = 1;
-        Thread.sleep( 10000 );
-        getSelenium().refresh();
 
         // check if project is building, or updating
         while ( isElementPresent( "//img[@alt='Building']" ) || isElementPresent( "//img[@alt='Updating']"
) )
         {
-            Thread.sleep( 10000 );
+            Thread.sleep( refreshInterval );
             getSelenium().refresh();
             waitPage();
+            currentIt++;
             if ( currentIt > maxIt )
             {
                 Assert.fail( "Timeout, Can't build project group" );
             }
-            currentIt++;
         }
 
-        Thread.sleep( 10000 );
         clickLinkWithText( projectName );
         clickLinkWithText( "Builds" );
         clickLinkWithText( "Result" );



Mime
View raw message