geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jche...@apache.org
Subject incubator-geode git commit: GEODE-1498 CI Failure: DurableClientCommandsDUnitTest.testCloseDurableClients
Date Mon, 06 Jun 2016 20:46:35 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/develop 0815e1b6e -> 6967ac19f


GEODE-1498 CI Failure: DurableClientCommandsDUnitTest.testCloseDurableClients

Use port 0 for cache server and return a random available port for durable client.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/6967ac19
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/6967ac19
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/6967ac19

Branch: refs/heads/develop
Commit: 6967ac19f2a53cf4c71b69ae06ff8fb39003de4f
Parents: 0815e1b
Author: Jianxia Chen <jchen@pivotal.io>
Authored: Mon Jun 6 13:45:15 2016 -0700
Committer: Jianxia Chen <jchen@pivotal.io>
Committed: Mon Jun 6 13:45:15 2016 -0700

----------------------------------------------------------------------
 .../cli/commands/DurableClientCommandsDUnitTest.java   | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6967ac19/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DurableClientCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DurableClientCommandsDUnitTest.java
b/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DurableClientCommandsDUnitTest.java
index c51f875..e8a5577 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DurableClientCommandsDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DurableClientCommandsDUnitTest.java
@@ -239,15 +239,14 @@ public class DurableClientCommandsDUnitTest extends CliCommandTestBase
{
   
   private void setupSystem() throws Exception {
     disconnectAllFromDS();
-    final int[] port = AvailablePortHelper.getRandomAvailableTCPPorts(2);
     setUpJmxManagerOnVm0ThenConnect(getServerProperties());
     
     final VM manager = Host.getHost(0).getVM(0);
     final VM server1 = Host.getHost(0).getVM(1);
     final VM client1 = Host.getHost(0).getVM(2);
     
-    startCacheServer(server1, port[0], false, regionName);
-    startDurableClient(client1, server1, port[0], clientName, "300");
+    int listeningPort = startCacheServer(server1, 0, false, regionName);
+    startDurableClient(client1, server1, listeningPort, clientName, "300");
   }
   
   /**
@@ -303,10 +302,10 @@ public class DurableClientCommandsDUnitTest extends CliCommandTestBase
{
     });
   }
   
-  private void startCacheServer(VM server, final int port, 
+  private int startCacheServer(VM server, final int port,
       final boolean createPR, final String regionName) throws Exception {
 
-    server.invoke(new SerializableCallable() {
+    Integer listeningPort = (Integer) server.invoke(new SerializableCallable() {
       public Object call() throws Exception {
         getSystem(getServerProperties());
         
@@ -331,9 +330,11 @@ public class DurableClientCommandsDUnitTest extends CliCommandTestBase
{
         cacheServer.setPort(port);
         cacheServer.start();
        
-        return null;
+        return cacheServer.getPort();
       }
     });
+
+    return listeningPort.intValue();
   }
   
   private void startDurableClient(VM client, final VM server, final int port,


Mime
View raw message