You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by to...@apache.org on 2015/02/05 18:18:20 UTC
incubator-usergrid git commit: Fixed test wiring to be unique
Repository: incubator-usergrid
Updated Branches:
refs/heads/two-dot-o-import fd4d47bb3 -> 0bf0d81de
Fixed test wiring to be unique
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/0bf0d81d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/0bf0d81d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/0bf0d81d
Branch: refs/heads/two-dot-o-import
Commit: 0bf0d81deb73b1fcb1359c4b564d77b243caa743
Parents: fd4d47b
Author: Todd Nine <tn...@apigee.com>
Authored: Thu Feb 5 10:17:56 2015 -0700
Committer: Todd Nine <tn...@apigee.com>
Committed: Thu Feb 5 10:17:56 2015 -0700
----------------------------------------------------------------------
.../management/importer/ImportCollectionIT.java | 30 ++++++++++++++------
1 file changed, 21 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/0bf0d81d/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportCollectionIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportCollectionIT.java b/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportCollectionIT.java
index 168cec7..4b4266a 100644
--- a/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportCollectionIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportCollectionIT.java
@@ -23,6 +23,8 @@ import com.google.common.util.concurrent.Service;
import com.google.inject.Module;
import org.apache.commons.lang.RandomStringUtils;
import org.apache.commons.lang3.StringUtils;
+
+import org.apache.usergrid.NewOrgAppAdminRule;
import org.apache.usergrid.ServiceITSetup;
import org.apache.usergrid.ServiceITSetupImpl;
import org.apache.usergrid.batch.service.JobSchedulerService;
@@ -65,10 +67,10 @@ public class ImportCollectionIT {
private static OrganizationInfo organization;
private static UUID applicationId;
+ private String bucketName;
+
QueueListener listener;
- final String bucketName = System.getProperty( "bucketName" )
- + RandomStringUtils.randomAlphanumeric(10).toLowerCase();
@Rule
public ClearShiroSubject clearShiroSubject = new ClearShiroSubject();
@@ -78,21 +80,25 @@ public class ImportCollectionIT {
new ServiceITSetupImpl( cassandraResource, new ElasticSearchResource() );
+ @Rule
+ public NewOrgAppAdminRule newOrgAppAdminRule = new NewOrgAppAdminRule( setup );
+
+
@BeforeClass
public static void setup() throws Exception {
- String username = "test"+ UUIDUtils.newTimeUUID();
+// String username = "test"+ UUIDUtils.newTimeUUID();
// start the scheduler after we're all set up
JobSchedulerService jobScheduler = cassandraResource.getBean( JobSchedulerService.class );
if ( jobScheduler.state() != Service.State.RUNNING ) {
jobScheduler.startAndWait();
}
-
- //creates sample test application
- adminUser = setup.getMgmtSvc().createAdminUser(
- username, username, username+"@test.com", username, false, false );
- organization = setup.getMgmtSvc().createOrganization( username, adminUser, true );
- applicationId = setup.getMgmtSvc().createApplication( organization.getUuid(), username+"app" ).getId();
+//
+// //creates sample test application
+// adminUser = setup.getMgmtSvc().createAdminUser(
+// username, username, username+"@test.com", username, false, false );
+// organization = setup.getMgmtSvc().createOrganization( username, adminUser, true );
+// applicationId = setup.getMgmtSvc().createApplication( organization.getUuid(), username+"app" ).getId();
}
@@ -114,6 +120,12 @@ public class ImportCollectionIT {
}
Assume.assumeTrue( configured );
+
+
+ adminUser = newOrgAppAdminRule.getAdminInfo();
+ organization = newOrgAppAdminRule.getOrganizationInfo();
+ applicationId = newOrgAppAdminRule.getApplicationInfo().getId();
+ bucketName = System.getProperty( "bucketName" )+ RandomStringUtils.randomAlphanumeric(10).toLowerCase();
}