usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [14/14] incubator-usergrid git commit: Add pauses to app create and delete tests.
Date Tue, 07 Apr 2015 13:20:55 GMT
Add pauses to app create and delete tests.


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/d67ff629
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/d67ff629
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/d67ff629

Branch: refs/heads/USERGRID-533-create-app-test
Commit: d67ff629d26dd77d3db46724379b26e2ef400f2a
Parents: 30651af
Author: Dave Johnson <dmjohnson@apigee.com>
Authored: Tue Apr 7 09:19:53 2015 -0400
Committer: Dave Johnson <dmjohnson@apigee.com>
Committed: Tue Apr 7 09:19:53 2015 -0400

----------------------------------------------------------------------
 .../usergrid/rest/applications/ApplicationCreateIT.java     | 1 +
 .../usergrid/rest/applications/ApplicationDeleteIT.java     | 9 ++++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d67ff629/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationCreateIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationCreateIT.java
b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationCreateIT.java
index 649d74e..01f3b61 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationCreateIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationCreateIT.java
@@ -114,6 +114,7 @@ public class ApplicationCreateIT extends AbstractRestIT {
             .post( ApiResponse.class, new Application( appName ) );
         UUID appId = appCreateResponse.getEntities().get(0).getUuid();
 
+        try { Thread.sleep(1000); } catch (InterruptedException ignored ) { }
 
         for ( int i=0; i<5; i++ ) {
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d67ff629/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationDeleteIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationDeleteIT.java
b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationDeleteIT.java
index 0727239..2a46bc5 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationDeleteIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationDeleteIT.java
@@ -34,8 +34,11 @@ import static org.junit.Assert.fail;
 
 
 public class ApplicationDeleteIT extends AbstractRestIT {
+
     private static final Logger logger = LoggerFactory.getLogger(ApplicationDeleteIT.class);
 
+    public static final int INDEXING_WAIT = 3000;
+
 
     /**
      * Test most common use cases.
@@ -207,7 +210,7 @@ public class ApplicationDeleteIT extends AbstractRestIT {
             .queryParam("app_delete_confirm", "confirm_delete_of_application_and_data")
             .delete();
 
-        Thread.sleep(1000);
+        Thread.sleep(INDEXING_WAIT);
 
         // restore the app
 
@@ -218,6 +221,8 @@ public class ApplicationDeleteIT extends AbstractRestIT {
             .queryParam("access_token", orgAdminToken.getAccessToken() )
             .put();
 
+        Thread.sleep(INDEXING_WAIT);
+
         // test that we can see the application in the list of applications
 
         logger.debug("\n\nGetting app list from management end-point\n");
@@ -360,6 +365,8 @@ public class ApplicationDeleteIT extends AbstractRestIT {
             .post( ApiResponse.class, new Application( appName ) );
         UUID appId = appCreateResponse.getEntities().get(0).getUuid();
 
+        try { Thread.sleep(INDEXING_WAIT); } catch (InterruptedException ignored ) { }
+
         for ( int i=0; i<10; i++ ) {
 
             final String entityName = "entity" + i;


Mime
View raw message