usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mru...@apache.org
Subject [27/35] usergrid git commit: fix duplicate user test to use random usernames in case DB cleanup not done correctly
Date Fri, 02 Sep 2016 00:51:46 GMT
fix duplicate user test to use random usernames in case DB cleanup not
done correctly


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

Branch: refs/heads/master
Commit: 9520496b819ad2e692fd9da2e56b7a46c54079f3
Parents: f73ce4a
Author: Mike Dunker <mdunker@apigee.com>
Authored: Wed Aug 31 12:29:55 2016 -0700
Committer: Mike Dunker <mdunker@apigee.com>
Committed: Wed Aug 31 12:29:55 2016 -0700

----------------------------------------------------------------------
 .../collection/uniquevalues/UniqueValuesServiceTest.java         | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/9520496b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/uniquevalues/UniqueValuesServiceTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/uniquevalues/UniqueValuesServiceTest.java
b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/uniquevalues/UniqueValuesServiceTest.java
index 1788a88..520b9af 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/uniquevalues/UniqueValuesServiceTest.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/uniquevalues/UniqueValuesServiceTest.java
@@ -47,6 +47,7 @@ import org.slf4j.LoggerFactory;
 import rx.Observable;
 
 import java.util.Collection;
+import java.util.UUID;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
@@ -137,9 +138,10 @@ public class UniqueValuesServiceTest extends AbstractUniqueValueTest
{
 
         for (int i = 0; i < numUsers; i++) {
 
+            String username = "user_" + UUID.randomUUID().toString();
+
             // multiple threads simultaneously trying to create a user with the same propertyName
             for (int j = 0; j < numThreads; j++) {
-                String username = "user_" + i;
 
                 execService.submit( () -> {
 


Mime
View raw message