geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinmeil...@apache.org
Subject [41/64] [abbrv] incubator-geode git commit: GEODE-337 CI failure: ClientHealthStatsDUnitTest.testStatsMatchWithSize
Date Thu, 31 Mar 2016 15:23:04 GMT
GEODE-337 CI failure: ClientHealthStatsDUnitTest.testStatsMatchWithSize

Modified the test to stop using AvailablePort and do a wild-card bind


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

Branch: refs/heads/feature/GEODE-17-2
Commit: 2a5e7fadcdd3bb36df547f38624845cf1659f1c7
Parents: 058f853
Author: Bruce Schuchardt <bschuchardt@pivotal.io>
Authored: Tue Mar 29 11:30:49 2016 -0700
Committer: Bruce Schuchardt <bschuchardt@pivotal.io>
Committed: Tue Mar 29 11:31:46 2016 -0700

----------------------------------------------------------------------
 .../management/ClientHealthStatsDUnitTest.java  | 33 ++++++--------------
 1 file changed, 10 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2a5e7fad/geode-core/src/test/java/com/gemstone/gemfire/management/ClientHealthStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/ClientHealthStatsDUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/management/ClientHealthStatsDUnitTest.java
index 124855b..448bbdb 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/ClientHealthStatsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/ClientHealthStatsDUnitTest.java
@@ -18,44 +18,32 @@ package com.gemstone.gemfire.management;
 
 import java.util.Properties;
 
-import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
 import com.gemstone.gemfire.cache.EntryEvent;
 import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
 import com.gemstone.gemfire.cache.RegionFactory;
 import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.client.ClientCache;
 import com.gemstone.gemfire.cache.client.ClientCacheFactory;
 import com.gemstone.gemfire.cache.client.ClientRegionFactory;
 import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
-import com.gemstone.gemfire.cache.client.PoolManager;
-import com.gemstone.gemfire.cache.client.internal.PoolImpl;
 import com.gemstone.gemfire.cache.server.CacheServer;
 import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
 import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.internal.OSProcess;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.ha.Bug48571DUnitTest;
 import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientNotifier;
 import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.RMIException;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
+import junit.framework.AssertionFailedError;
+
 /**
  * Client health stats check
  * 
@@ -217,9 +205,8 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
     rf.setConcurrencyChecksEnabled(false);
     rf.create(REGION_NAME);
 
-    int port = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
     CacheServer server1 = cache.addCacheServer();
-    server1.setPort(port);
+    server1.setPort(0);
     server1.start();
     return server1.getPort();
   }
@@ -361,8 +348,8 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
 
       String[] clientIds = bean.getClientIds();
       assertTrue(clientIds.length == 2);
-      LogWriterUtils.getLogWriter().info("<ExpectedString> ClientId-1 of the Server
is  " + clientIds[0] + "</ExpectedString> ");
-      LogWriterUtils.getLogWriter().info("<ExpectedString> ClientId-2 of the Server
is  " + clientIds[1] + "</ExpectedString> ");
+      System.out.println("<ExpectedString> ClientId-1 of the Server is  " + clientIds[0]
+ "</ExpectedString> ");
+      System.out.println("<ExpectedString> ClientId-2 of the Server is  " + clientIds[1]
+ "</ExpectedString> ");
       
       ClientHealthStatus[] clientStatuses = bean.showAllClientStats();
 
@@ -372,15 +359,15 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase
{
       ClientHealthStatus clientStatus2 = bean.showClientStats(clientIds[1]);
       assertNotNull(clientStatus1);
       assertNotNull(clientStatus2);
-      LogWriterUtils.getLogWriter().info("<ExpectedString> ClientStats-1 of the Server
is  " + clientStatus1 + "</ExpectedString> ");
-      LogWriterUtils.getLogWriter().info("<ExpectedString> ClientStats-2 of the Server
is  " + clientStatus2 + "</ExpectedString> ");
+      System.out.println("<ExpectedString> ClientStats-1 of the Server is  " + clientStatus1
+ "</ExpectedString> ");
+      System.out.println("<ExpectedString> ClientStats-2 of the Server is  " + clientStatus2
+ "</ExpectedString> ");
 
-      LogWriterUtils.getLogWriter().info("<ExpectedString> clientStatuses " + clientStatuses
+ "</ExpectedString> ");
+      System.out.println("<ExpectedString> clientStatuses " + clientStatuses + "</ExpectedString>
");
       assertNotNull(clientStatuses);
       
       assertTrue(clientStatuses.length == 2);
       for (ClientHealthStatus status : clientStatuses) {
-        LogWriterUtils.getLogWriter().info("<ExpectedString> ClientStats of the Server
is  " + status + "</ExpectedString> ");
+        System.out.println("<ExpectedString> ClientStats of the Server is  " + status
+ "</ExpectedString> ");
 
       }
 


Mime
View raw message