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/03/04 23:57:43 UTC
[19/50] [abbrv] incubator-usergrid git commit: adding application
creation protection
adding application creation protection
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/0f9e8c9f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/0f9e8c9f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/0f9e8c9f
Branch: refs/heads/USERGRID-405
Commit: 0f9e8c9f478f497fef54b3aa6612133b511c8922
Parents: 497ac05
Author: Shawn Feldman <sf...@apache.org>
Authored: Mon Mar 2 08:22:49 2015 -0700
Committer: Shawn Feldman <sf...@apache.org>
Committed: Mon Mar 2 08:22:49 2015 -0700
----------------------------------------------------------------------
.../test/java/org/apache/usergrid/rest/AbstractRestIT.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/0f9e8c9f/stack/rest/src/test/java/org/apache/usergrid/rest/AbstractRestIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/AbstractRestIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/AbstractRestIT.java
index 5f4a534..1b3ee65 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/AbstractRestIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/AbstractRestIT.java
@@ -33,6 +33,7 @@ import org.apache.usergrid.management.ApplicationInfo;
import org.apache.usergrid.management.OrganizationInfo;
import org.apache.usergrid.management.OrganizationOwnerInfo;
+import org.apache.usergrid.persistence.exceptions.ApplicationAlreadyExistsException;
import org.junit.AfterClass;
import org.junit.Before;
import org.slf4j.Logger;
@@ -146,7 +147,12 @@ public abstract class AbstractRestIT extends JerseyTest {
orgInfo = orgOwnerInfo.getOrganization();
}
- appInfo = setup.getMgmtSvc().createApplication(orgInfo.getUuid(), "app-" + rand);
+ String appname = "app-" + rand;
+ try {
+ appInfo = setup.getMgmtSvc().createApplication(orgInfo.getUuid(),appname);
+ }catch(ApplicationAlreadyExistsException e){
+ LOG.error("Failed to create application"+appname+", maybe this is ok", e);
+ }
refreshIndex( orgInfo.getName(), appInfo.getName() );
orgAppPath = appInfo.getName() + "/";