ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1489002 - in /ace/trunk: org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/ org.apache.ace.client.rest.itest/src/org/apache/ace/client/rest/itest/ org.apache.ace.configurator.useradmin.itest/src/org/apache/ace/it/use...
Date Mon, 03 Jun 2013 14:18:45 GMT
Author: bramk
Date: Mon Jun  3 14:18:44 2013
New Revision: 1489002

URL: http://svn.apache.org/r1489002
Log:
ACE-339 Moved to generic sleep in itest base class

Modified:
    ace/trunk/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/ObrAuthenticationTest.java
    ace/trunk/org.apache.ace.client.rest.itest/src/org/apache/ace/client/rest/itest/RESTClientTest.java
    ace/trunk/org.apache.ace.configurator.useradmin.itest/src/org/apache/ace/it/useradminconfigurator/ConfiguratorTest.java
    ace/trunk/org.apache.ace.test/src/org/apache/ace/it/IntegrationTestBase.java

Modified: ace/trunk/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/ObrAuthenticationTest.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/ObrAuthenticationTest.java?rev=1489002&r1=1489001&r2=1489002&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/ObrAuthenticationTest.java
(original)
+++ ace/trunk/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/ObrAuthenticationTest.java
Mon Jun  3 14:18:44 2013
@@ -53,7 +53,6 @@ public class ObrAuthenticationTest exten
     private volatile String m_endpoint;
     private volatile File m_storeLocation;
     private volatile String m_authConfigPID;
-    private boolean m_hasBeenSetup = false;
 
     /* Injected by dependency manager */
     private volatile ArtifactRepository m_artifactRepository;
@@ -79,8 +78,6 @@ public class ObrAuthenticationTest exten
 
     @Override
     protected void configureProvisionedServices() throws Exception {
-        if (m_hasBeenSetup)
-            return;
 
         m_endpoint = "/obr";
         String tmpDir = System.getProperty("java.io.tmpdir");
@@ -113,10 +110,6 @@ public class ObrAuthenticationTest exten
     @Override
     protected void configureAdditionalServices() throws Exception {
 
-        if (m_hasBeenSetup)
-            return;
-        m_hasBeenSetup = true;
-
         String userName = "d";
         String password = "f";
         importSingleUser(m_userRepository, userName, password);
@@ -136,9 +129,6 @@ public class ObrAuthenticationTest exten
             "authentication.user.password", password);
 
         assertTrue("Failed to access auditlog in time!", waitForURL(m_connectionFactory,
testURL, 200, 15000));
-
-        // Wait for CM to settle or we may get "socket closed" due to HTTP service restarts
-        Thread.sleep(1000);
     }
 
     public void tearDown() throws Exception {

Modified: ace/trunk/org.apache.ace.client.rest.itest/src/org/apache/ace/client/rest/itest/RESTClientTest.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.rest.itest/src/org/apache/ace/client/rest/itest/RESTClientTest.java?rev=1489002&r1=1489001&r2=1489002&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.rest.itest/src/org/apache/ace/client/rest/itest/RESTClientTest.java
(original)
+++ ace/trunk/org.apache.ace.client.rest.itest/src/org/apache/ace/client/rest/itest/RESTClientTest.java
Mon Jun  3 14:18:44 2013
@@ -60,6 +60,9 @@ public class RESTClientTest extends Inte
             configureServer();
             createServerUser();
             m_hasBeenSetup = true;
+            
+            System.err.println("Sleeping...");
+            Thread.sleep(1000);
         }
     }
     

Modified: ace/trunk/org.apache.ace.configurator.useradmin.itest/src/org/apache/ace/it/useradminconfigurator/ConfiguratorTest.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.configurator.useradmin.itest/src/org/apache/ace/it/useradminconfigurator/ConfiguratorTest.java?rev=1489002&r1=1489001&r2=1489002&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.configurator.useradmin.itest/src/org/apache/ace/it/useradminconfigurator/ConfiguratorTest.java
(original)
+++ ace/trunk/org.apache.ace.configurator.useradmin.itest/src/org/apache/ace/it/useradminconfigurator/ConfiguratorTest.java
Mon Jun  3 14:18:44 2013
@@ -56,7 +56,7 @@ public class ConfiguratorTest extends In
         User user = (User) m_userAdmin.getRole("TestUser");
         int count = 0;
         while ((user == null) && (count < 60)) {
-            Thread.sleep(250);
+            Thread.sleep(50);
             user = (User) m_userAdmin.getRole("TestUser");
             count++;
         }

Modified: ace/trunk/org.apache.ace.test/src/org/apache/ace/it/IntegrationTestBase.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.test/src/org/apache/ace/it/IntegrationTestBase.java?rev=1489002&r1=1489001&r2=1489002&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.test/src/org/apache/ace/it/IntegrationTestBase.java (original)
+++ ace/trunk/org.apache.ace.test/src/org/apache/ace/it/IntegrationTestBase.java Mon Jun 
3 14:18:44 2013
@@ -337,6 +337,10 @@ public class IntegrationTestBase extends
             }
             
         	configureAdditionalServices();
+        	
+            // Wait for CM to settle or we may get "socket closed" due to HTTP service restarts
+            System.out.println("Sleeping...");
+            Thread.sleep(2000);
         }
         catch (InterruptedException e) {
             fail("Interrupted while waiting for services to get started.");



Mime
View raw message