You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2015/03/30 21:58:39 UTC
[35/50] incubator-usergrid git commit: Match what is in 405.
Match what is in 405.
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/3b71f5e3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/3b71f5e3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/3b71f5e3
Branch: refs/heads/two-dot-o-dev
Commit: 3b71f5e373a96eb7503ae5de2b82265559957996
Parents: e47555e
Author: Dave Johnson <dm...@apigee.com>
Authored: Fri Mar 20 11:08:45 2015 -0400
Committer: Dave Johnson <dm...@apigee.com>
Committed: Fri Mar 20 11:08:45 2015 -0400
----------------------------------------------------------------------
.../usergrid/setup/ConcurrentProcessSingleton.java | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3b71f5e3/stack/test-utils/src/main/java/org/apache/usergrid/setup/ConcurrentProcessSingleton.java
----------------------------------------------------------------------
diff --git a/stack/test-utils/src/main/java/org/apache/usergrid/setup/ConcurrentProcessSingleton.java b/stack/test-utils/src/main/java/org/apache/usergrid/setup/ConcurrentProcessSingleton.java
index 64a2f7a..7cb5073 100644
--- a/stack/test-utils/src/main/java/org/apache/usergrid/setup/ConcurrentProcessSingleton.java
+++ b/stack/test-utils/src/main/java/org/apache/usergrid/setup/ConcurrentProcessSingleton.java
@@ -40,7 +40,8 @@ public class ConcurrentProcessSingleton {
private static final String TEMP_FILE_PATH = "target/surefirelocks/start_barrier-"
+ System.getProperty( "test.barrier.timestamp", "default" );
- public static final int LOCK_PORT = Integer.parseInt( System.getProperty( "test.lock.port", "10101" ) );
+ public static final int LOCK_PORT = Integer.parseInt(
+ System.getProperty( "test.lock.port", "10101" ) );
public static final boolean CLEAN_STORAGE =
Boolean.parseBoolean( System.getProperty( "test.clean.storage", "false" ) );
@@ -100,17 +101,12 @@ public class ConcurrentProcessSingleton {
// signal to other processes we've migrated, and they can proceed
barrier.proceed();
+ }
- logger.info( "Waiting for setup to complete" );
- barrier.await( ONE_MINUTE );
- logger.info( "Setup to complete" );
-
- lock.maybeReleaseLock();
- } else {
- throw new RuntimeException( "Unable to initialize system: could not get lock."
- +" Some other process must be binding to port " + LOCK_PORT );
- }
+ logger.info( "Waiting for setup to complete" );
+ barrier.await( ONE_MINUTE );
+ logger.info( "Setup to complete" );
Runtime.getRuntime().addShutdownHook( new Thread( ){
@Override
@@ -125,7 +121,6 @@ public class ConcurrentProcessSingleton {
});
}
-
catch ( Exception e ) {
throw new RuntimeException( "Unable to initialize system", e );
}