accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1477783 - in /accumulo/trunk: ./ assemble/ core/ examples/ fate/src/main/java/org/apache/accumulo/fate/ fate/src/main/java/org/apache/accumulo/fate/zookeeper/ proxy/src/test/java/org/apache/accumulo/proxy/ server/ src/ test/src/main/java/o...
Date Tue, 30 Apr 2013 19:21:59 GMT
Author: ecn
Date: Tue Apr 30 19:21:58 2013
New Revision: 1477783

URL: http://svn.apache.org/r1477783
Log:
ACCUMULO-1365 use the MAC mechanism for finding a random port

Modified:
    accumulo/trunk/   (props changed)
    accumulo/trunk/assemble/   (props changed)
    accumulo/trunk/core/   (props changed)
    accumulo/trunk/examples/   (props changed)
    accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java   (props changed)
    accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java 
 (props changed)
    accumulo/trunk/pom.xml   (props changed)
    accumulo/trunk/proxy/src/test/java/org/apache/accumulo/proxy/SimpleTest.java
    accumulo/trunk/server/   (props changed)
    accumulo/trunk/src/   (props changed)
    accumulo/trunk/test/src/main/java/org/apache/accumulo/test/MiniAccumuloCluster.java

Propchange: accumulo/trunk/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5:r1477782

Propchange: accumulo/trunk/assemble/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/assemble:r1477782

Propchange: accumulo/trunk/core/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/core:r1477782

Propchange: accumulo/trunk/examples/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/examples:r1477782

Propchange: accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java:r1477782

Propchange: accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:r1477782

Propchange: accumulo/trunk/pom.xml
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/pom.xml:r1477782

Modified: accumulo/trunk/proxy/src/test/java/org/apache/accumulo/proxy/SimpleTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/test/java/org/apache/accumulo/proxy/SimpleTest.java?rev=1477783&r1=1477782&r2=1477783&view=diff
==============================================================================
--- accumulo/trunk/proxy/src/test/java/org/apache/accumulo/proxy/SimpleTest.java (original)
+++ accumulo/trunk/proxy/src/test/java/org/apache/accumulo/proxy/SimpleTest.java Tue Apr 30
19:21:58 2013
@@ -129,8 +129,7 @@ public class SimpleTest {
     protocolFactories.add(org.apache.thrift.protocol.TTupleProtocol.Factory.class);
     protocolFactories.add(org.apache.thrift.protocol.TCompactProtocol.Factory.class);
     
-    Random rand = new Random();
-    return protocolFactories.get(rand.nextInt(protocolFactories.size()));
+    return protocolFactories.get(random.nextInt(protocolFactories.size()));
   }
   
   @BeforeClass
@@ -147,7 +146,7 @@ public class SimpleTest {
     protocolClass = getRandomProtocol();
     System.out.println(protocolClass.getName());
     
-    proxyPort = 40000 + random.nextInt(20000);
+    proxyPort = MiniAccumuloCluster.getRandomFreePort();
     proxyServer = Proxy.createProxyServer(org.apache.accumulo.proxy.thrift.AccumuloProxy.class,
org.apache.accumulo.proxy.ProxyServer.class, proxyPort,
         protocolClass, props);
     thread = new Thread() {

Propchange: accumulo/trunk/server/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/server:r1477782

Propchange: accumulo/trunk/src/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/src:r1477782

Modified: accumulo/trunk/test/src/main/java/org/apache/accumulo/test/MiniAccumuloCluster.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/main/java/org/apache/accumulo/test/MiniAccumuloCluster.java?rev=1477783&r1=1477782&r2=1477783&view=diff
==============================================================================
--- accumulo/trunk/test/src/main/java/org/apache/accumulo/test/MiniAccumuloCluster.java (original)
+++ accumulo/trunk/test/src/main/java/org/apache/accumulo/test/MiniAccumuloCluster.java Tue
Apr 30 19:21:58 2013
@@ -121,7 +121,7 @@ public class MiniAccumuloCluster {
   private MiniAccumuloConfig config;
   private Process[] tabletServerProcesses;
   
-  private int getRandomFreePort() {
+  static public int getRandomFreePort() {
     Random r = new Random();
     int count = 0;
     



Mime
View raw message