usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject git commit: Test fixes for tests that seem to fail intermittently on machines with lots of cores.
Date Tue, 02 Sep 2014 20:01:36 GMT
Repository: incubator-usergrid
Updated Branches:
  refs/heads/two-dot-o 2b1f7351d -> 193d0cd4a


Test fixes for tests that seem to fail intermittently on machines with lots of cores.


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

Branch: refs/heads/two-dot-o
Commit: 193d0cd4a1d9c3f67339bcbb70fe111965b2f164
Parents: 2b1f735
Author: Dave Johnson <dmjohnson@apigee.com>
Authored: Tue Sep 2 16:01:10 2014 -0400
Committer: Dave Johnson <dmjohnson@apigee.com>
Committed: Tue Sep 2 16:01:10 2014 -0400

----------------------------------------------------------------------
 .../apache/usergrid/rest/applications/utils/UserRepo.java   | 9 +++++++++
 .../java/org/apache/usergrid/management/OrganizationIT.java | 2 ++
 2 files changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/193d0cd4/stack/rest/src/test/java/org/apache/usergrid/rest/applications/utils/UserRepo.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/utils/UserRepo.java
b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/utils/UserRepo.java
index 6ca20e5..b214549 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/utils/UserRepo.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/utils/UserRepo.java
@@ -24,6 +24,8 @@ import java.io.IOException;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.UUID;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 import javax.ws.rs.core.MediaType;
 import static org.apache.usergrid.utils.MapUtils.hashMap;
 import org.apache.usergrid.utils.UUIDUtils;
@@ -42,9 +44,16 @@ public enum UserRepo {
             return;
         }
 
+        // pause between creation to insure entities are created in order
+
         createUser( "user1", "user1@apigee.com", "user1", "Jane Smith 1", resource, accessToken
);
+        try { Thread.sleep(200); } catch (InterruptedException ex) { }
+
         createUser( "user2", "user2@apigee.com", "user2", "John Smith 2", resource, accessToken
);
+        try { Thread.sleep(200); } catch (InterruptedException ex) { }
+
         createUser( "user3", "user3@apigee.com", "user3", "John Smith 3", resource, accessToken
);
+        try { Thread.sleep(200); } catch (InterruptedException ex) { }
     }
 
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/193d0cd4/stack/services/src/test/java/org/apache/usergrid/management/OrganizationIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/management/OrganizationIT.java
b/stack/services/src/test/java/org/apache/usergrid/management/OrganizationIT.java
index 509ca22..02db523 100644
--- a/stack/services/src/test/java/org/apache/usergrid/management/OrganizationIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/management/OrganizationIT.java
@@ -85,6 +85,8 @@ public class OrganizationIT {
 
         setup.getMgmtSvc().activateOrganization( organization2 );
 
+        setup.getEmf().getEntityManager( setup.getSmf().getManagementAppId() ).refreshIndex();
+
         UserInfo u = setup.getMgmtSvc().verifyAdminUserPasswordCredentials( user.getUuid().toString(),
"test" );
         assertNotNull( u );
 


Mime
View raw message