geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bschucha...@apache.org
Subject [4/4] incubator-geode git commit: GEODE-1078 CI failure: ClientMembershipSelectorDUnitTest.testClientMembershipEventsInServer
Date Mon, 14 Mar 2016 16:35:37 GMT
GEODE-1078 CI failure: ClientMembershipSelectorDUnitTest.testClientMembershipEventsInServer

added an assertion that the distributed system hasn't changed in between
getSystem() and createRegion() calls.


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

Branch: refs/heads/develop
Commit: c5d8ea770d56832b54fb64ade61cef956317b638
Parents: aef84eb
Author: Bruce Schuchardt <bschuchardt@pivotal.io>
Authored: Mon Mar 14 09:33:20 2016 -0700
Committer: Bruce Schuchardt <bschuchardt@pivotal.io>
Committed: Mon Mar 14 09:34:52 2016 -0700

----------------------------------------------------------------------
 .../cache30/ClientMembershipDUnitTest.java      | 138 ++++++++++---------
 1 file changed, 74 insertions(+), 64 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c5d8ea77/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
index a8ea590..d4678ca 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
@@ -42,10 +42,12 @@ import com.gemstone.gemfire.cache.client.ClientCache;
 import com.gemstone.gemfire.cache.client.Pool;
 import com.gemstone.gemfire.cache.client.PoolManager;
 import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.distributed.DurableClientAttributes;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.internal.SocketCreator;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.tier.InternalClientMembership;
 import com.gemstone.gemfire.internal.cache.tier.sockets.AcceptorImpl;
 import com.gemstone.gemfire.internal.cache.tier.sockets.ServerConnection;
@@ -57,6 +59,7 @@ import com.gemstone.gemfire.management.membership.ClientMembershipListener;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.Invoke;
 import com.gemstone.gemfire.test.dunit.NetworkUtils;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
@@ -85,15 +88,20 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     super(name);
   }
 
+  @Override
   public void setUp() throws Exception {
     super.setUp();
   }
   
   @Override
-  protected final void postTearDownCacheTestCase() throws Exception {
-    InternalClientMembership.unregisterAllListeners();
+  protected void postTearDown() throws Exception {
+    Invoke.invokeInEveryVM((() -> cleanup()));
   }
-
+  
+  public static void cleanup() {
+    properties = null;
+  }
+  
   private void waitForAcceptsInProgressToBe(final int target)
     throws Exception {
     WaitCriterion ev = new WaitCriterion() {
@@ -138,7 +146,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       SerializableRunnable createMeanSocket = new CacheSerializableRunnable("Connect to server
with socket") {
         public void run2() throws CacheException {
           getCache(); // create a cache so we have stats
-          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("connecting
to cache server with socket");
+          System.out.println("connecting to cache server with socket");
           try {
             InetAddress addr = InetAddress.getByName(hostName);
             meanSocket = new Socket(addr, port);
@@ -150,7 +158,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       };
       SerializableRunnable closeMeanSocket = new CacheSerializableRunnable("close mean socket")
{
         public void run2() throws CacheException {
-          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("closing mean
socket");
+          System.out.println("closing mean socket");
           try {
             meanSocket.close();
           }
@@ -161,28 +169,28 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase
{
 
       assertEquals(0, getAcceptsInProgress());
       
-      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("creating mean socket");
+      System.out.println("creating mean socket");
       vm0.invoke(createMeanSocket);
       try {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("waiting to see
it connect on server");
+        System.out.println("waiting to see it connect on server");
         waitForAcceptsInProgressToBe(1);
       } finally {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("closing mean
socket");
+        System.out.println("closing mean socket");
         vm0.invoke(closeMeanSocket);
       }
-      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("waiting to see
accept to go away on server");
+      System.out.println("waiting to see accept to go away on server");
       waitForAcceptsInProgressToBe(0);
 
       // now try it without a close. Server should timeout the mean connect
-      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("creating mean socket
2");
+      System.out.println("creating mean socket 2");
       vm0.invoke(createMeanSocket);
       try {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("waiting to see
it connect on server 2");
+        System.out.println("waiting to see it connect on server 2");
         waitForAcceptsInProgressToBe(1);
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("waiting to see
accept to go away on server without us closing");
+        System.out.println("waiting to see accept to go away on server without us closing");
         waitForAcceptsInProgressToBe(0);
       } finally {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("closing mean
socket 2");
+        System.out.println("closing mean socket 2");
         vm0.invoke(closeMeanSocket);
       }
 
@@ -749,7 +757,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     // create and register ClientMembershipListener in controller vm...
     ClientMembershipListener listener = new ClientMembershipListener() {
       public synchronized void memberJoined(ClientMembershipEvent event) {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient]
memberJoined: " + event);
+        System.out.println("[testClientMembershipEventsInClient] memberJoined: " + event);
         fired[JOINED] = true;
         member[JOINED] = event.getMember();
         memberId[JOINED] = event.getMemberId();
@@ -757,11 +765,11 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase
{
         notifyAll();
       }
       public synchronized void memberLeft(ClientMembershipEvent event) {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient]
memberLeft: " + event);
+        System.out.println("[testClientMembershipEventsInClient] memberLeft: " + event);
 //        fail("Please update testClientMembershipEventsInClient to handle memberLeft for
BridgeServer.");
       }
       public synchronized void memberCrashed(ClientMembershipEvent event) {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient]
memberCrashed: " + event);
+        System.out.println("[testClientMembershipEventsInClient] memberCrashed: " + event);
         fired[CRASHED] = true;
         member[CRASHED] = event.getMember();
         memberId[CRASHED] = event.getMemberId();
@@ -779,7 +787,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     vm0.invoke(new CacheSerializableRunnable("Create BridgeServer") {
       public void run2() throws CacheException {
         try {
-          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient]
Create BridgeServer");
+          System.out.println("[testClientMembershipEventsInClient] Create BridgeServer");
           getSystem();
           AttributesFactory factory = new AttributesFactory();
           factory.setScope(Scope.LOCAL);
@@ -803,9 +811,9 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
 
     String serverMemberId = serverMember.toString();
 
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient]
ports[0]=" + ports[0]);
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient]
serverMember=" + serverMember);
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient]
serverMemberId=" + serverMemberId);
+    System.out.println("[testClientMembershipEventsInClient] ports[0]=" + ports[0]);
+    System.out.println("[testClientMembershipEventsInClient] serverMember=" + serverMember);
+    System.out.println("[testClientMembershipEventsInClient] serverMemberId=" + serverMemberId);
 
     assertFalse(fired[JOINED]);
     assertNull(member[JOINED]);
@@ -821,7 +829,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     assertFalse(isClient[CRASHED]);
     
     // sanity check...
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient]
sanity check");
+    System.out.println("[testClientMembershipEventsInClient] sanity check");
     DistributedMember test = new TestDistributedMember("test");
     InternalClientMembership.notifyJoined(test, SERVER);
     synchronized(listener) {
@@ -845,7 +853,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     resetArraysForTesting(fired, member, memberId, isClient);
     
     // create bridge client in controller vm...
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient]
create bridge client");
+    System.out.println("[testClientMembershipEventsInClient] create bridge client");
     Properties config = new Properties();
     config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     config.setProperty(DistributionConfig.LOCATORS_NAME, "");
@@ -868,7 +876,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       }
     }
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient]
assert client detected server join");
+    System.out.println("[testClientMembershipEventsInClient] assert client detected server
join");
     
     // first check the getCurrentServers() result
     ClientCache clientCache = (ClientCache)getCache();
@@ -897,7 +905,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
 
     vm0.invoke(new SerializableRunnable("Stop BridgeServer") {
       public void run() {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient]
Stop BridgeServer");
+        System.out.println("[testClientMembershipEventsInClient] Stop BridgeServer");
         stopBridgeServers(getCache());
       }
     });
@@ -907,7 +915,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       }
     }
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient]
assert client detected server departure");
+    System.out.println("[testClientMembershipEventsInClient] assert client detected server
departure");
     assertFalse(fired[JOINED]);
     assertNull(member[JOINED]);
     assertNull(memberId[JOINED]);
@@ -928,7 +936,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     vm0.invoke(new CacheSerializableRunnable("Recreate BridgeServer") {
       public void run2() throws CacheException {
         try {
-          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient]
restarting BridgeServer");
+          System.out.println("[testClientMembershipEventsInClient] restarting BridgeServer");
           startBridgeServer(ports[0]);
         }
         catch(IOException e) {
@@ -943,7 +951,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       }
     }
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient]
assert client detected server recovery");
+    System.out.println("[testClientMembershipEventsInClient] assert client detected server
recovery");
     assertTrue(fired[JOINED]);
     assertNotNull(member[JOINED]);
     assertNotNull(memberId[JOINED]);
@@ -972,7 +980,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     // create and register ClientMembershipListener in controller vm...
     ClientMembershipListener listener = new ClientMembershipListener() {
       public synchronized void memberJoined(ClientMembershipEvent event) {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer]
memberJoined: " + event);
+        System.out.println("[testClientMembershipEventsInServer] memberJoined: " + event);
         fired[JOINED] = true;
         member[JOINED] = event.getMember();
         memberId[JOINED] = event.getMemberId();
@@ -981,7 +989,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
         assertFalse(fired[LEFT] || fired[CRASHED]);
       }
       public synchronized void memberLeft(ClientMembershipEvent event) {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer]
memberLeft: " + event);
+        System.out.println("[testClientMembershipEventsInServer] memberLeft: " + event);
         fired[LEFT] = true;
         member[LEFT] = event.getMember();
         memberId[LEFT] = event.getMemberId();
@@ -990,7 +998,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
         assertFalse(fired[JOINED] || fired[CRASHED]);
       }
       public synchronized void memberCrashed(ClientMembershipEvent event) {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer]
memberCrashed: " + event);
+        System.out.println("[testClientMembershipEventsInServer] memberCrashed: " + event);
         fired[CRASHED] = true;
         member[CRASHED] = event.getMember();
         memberId[CRASHED] = event.getMemberId();
@@ -1006,7 +1014,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase
{
     final int[] ports = new int[1];
 
     // create BridgeServer in controller vm...
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer]
Create BridgeServer");
+    System.out.println("[testClientMembershipEventsInServer] Create BridgeServer");
     getSystem();
     AttributesFactory factory = new AttributesFactory();
     factory.setScope(Scope.LOCAL);
@@ -1019,9 +1027,9 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase
{
     DistributedMember serverMember = getMemberId();
     String serverMemberId = serverMember.toString();
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer]
ports[0]=" + ports[0]);
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer]
serverMemberId=" + serverMemberId);
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer]
serverMember=" + serverMember);
+    System.out.println("[testClientMembershipEventsInServer] ports[0]=" + ports[0]);
+    System.out.println("[testClientMembershipEventsInServer] serverMemberId=" + serverMemberId);
+    System.out.println("[testClientMembershipEventsInServer] serverMember=" + serverMember);
 
     assertFalse(fired[JOINED]);
     assertNull(member[JOINED]);
@@ -1037,7 +1045,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase
{
     assertFalse(isClient[CRASHED]);
     
     // sanity check...
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer]
sanity check");
+    System.out.println("[testClientMembershipEventsInServer] sanity check");
     DistributedMember test = new TestDistributedMember("test");
     InternalClientMembership.notifyJoined(test, CLIENT);
     synchronized(listener) {
@@ -1063,16 +1071,17 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase
{
     SerializableCallable createConnectionPool =
     new SerializableCallable("Create connectionPool") {
       public Object call() {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer]
create bridge client");
+        System.out.println("[testClientMembershipEventsInServer] create bridge client");
         Properties config = new Properties();
         config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
         config.setProperty(DistributionConfig.LOCATORS_NAME, "");
-        getSystem(config);
+        properties = config;
+        DistributedSystem s = getSystem(config);
         AttributesFactory factory = new AttributesFactory();
-        factory.setScope(Scope.LOCAL);
-        ClientServerTestCase.configureConnectionPool(factory, NetworkUtils.getServerHostName(host),
ports, true, -1, 2, null);
+        Pool pool = ClientServerTestCase.configureConnectionPool(factory, NetworkUtils.getServerHostName(host),
ports, true, -1, 2, null);
         createRegion(name, factory.create());
         assertNotNull(getRootRegion().getSubregion(name));
+        assertTrue(s == system); // see geode-1078
         return getMemberId();
       }
     };
@@ -1087,7 +1096,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase
{
       }
     }
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer]
assert server detected client join");
+    System.out.println("[testClientMembershipEventsInServer] assert server detected client
join");
     assertTrue(fired[JOINED]);
     assertEquals(member[JOINED] + " should equal " + clientMember,
       clientMember, member[JOINED]);
@@ -1108,7 +1117,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase
{
     
     vm0.invoke(new SerializableRunnable("Stop bridge client") {
       public void run() {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer]
Stop bridge client");
+        System.out.println("[testClientMembershipEventsInServer] Stop bridge client");
         getRootRegion().getSubregion(name).close();
         Map m = PoolManager.getAll();
         Iterator mit = m.values().iterator();
@@ -1125,7 +1134,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase
{
       }
     }
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer]
assert server detected client left");
+    System.out.println("[testClientMembershipEventsInServer] assert server detected client
left");
     assertFalse(fired[JOINED]);
     assertNull(member[JOINED]);
     assertNull(memberId[JOINED]);
@@ -1149,7 +1158,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase
{
       }
     }
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer]
assert server detected client re-join");
+    System.out.println("[testClientMembershipEventsInServer] assert server detected client
re-join");
     assertTrue(fired[JOINED]);
     assertEquals(clientMember, member[JOINED]);
     assertEquals(clientMemberId, memberId[JOINED]);
@@ -1170,7 +1179,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase
{
     try {
       vm0.invoke(new SerializableRunnable("Stop bridge client") {
         public void run() {
-          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer]
Stop bridge client");
+          System.out.println("[testClientMembershipEventsInServer] Stop bridge client");
           getRootRegion().getSubregion(name).close();
           Map m = PoolManager.getAll();
           Iterator mit = m.values().iterator();
@@ -1187,7 +1196,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase
{
         }
       }
       
-      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer]
assert server detected client crashed");
+      System.out.println("[testClientMembershipEventsInServer] assert server detected client
crashed");
       assertFalse(fired[JOINED]);
       assertNull(member[JOINED]);
       assertNull(memberId[JOINED]);
@@ -1253,6 +1262,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase
{
     Properties config = new Properties();
     config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     config.setProperty(DistributionConfig.LOCATORS_NAME, "");
+    properties = config;
     getSystem(config);
     
     // assert that event is fired while connected
@@ -1284,6 +1294,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase
{
     resetArraysForTesting(fired, member, memberId, isClient);
     
     // assert that event is fired again after reconnecting
+    properties = config;
     InternalDistributedSystem sys = getSystem(config);
     assertTrue(sys.isConnected());
 
@@ -1310,7 +1321,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase
{
     IgnoredException.addIgnoredException("ConnectException");
 
     // create BridgeServer in controller vm...
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedClients]
Create BridgeServer");
+    System.out.println("[testGetConnectedClients] Create BridgeServer");
     getSystem();
     AttributesFactory factory = new AttributesFactory();
     factory.setScope(Scope.LOCAL);
@@ -1322,20 +1333,17 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase
{
     assertTrue(ports[0] != 0);
     String serverMemberId = getSystem().getDistributedMember().toString();
 
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedClients]
ports[0]=" + ports[0]);
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedClients]
serverMemberId=" + serverMemberId);
+    System.out.println("[testGetConnectedClients] ports[0]=" + ports[0]);
+    System.out.println("[testGetConnectedClients] serverMemberId=" + serverMemberId);
 
     final Host host = Host.getHost(0);
     SerializableCallable createPool =
     new SerializableCallable("Create connection pool") {
       public Object call() {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedClients]
create bridge client");
+        System.out.println("[testGetConnectedClients] create bridge client");
         properties = new Properties();
         properties.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
         properties.setProperty(DistributionConfig.LOCATORS_NAME, "");
-        // 11/30/2015 this test is periodically failing during distributedTest runs
-        // so we are setting the log-level to fine to figure out what's going on
-        properties.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
         getSystem(properties);
         AttributesFactory factory = new AttributesFactory();
         factory.setScope(Scope.LOCAL);
@@ -1407,7 +1415,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase
{
       vm.invoke(new CacheSerializableRunnable("Create bridge server") {
         public void run2() throws CacheException {
           // create BridgeServer in controller vm...
-          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedServers]
Create BridgeServer");
+          System.out.println("[testGetConnectedServers] Create BridgeServer");
           getSystem();
           AttributesFactory factory = new AttributesFactory();
           factory.setScope(Scope.LOCAL);
@@ -1426,9 +1434,9 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase
{
           
           assertTrue(testGetConnectedServers_port != 0);
       
-          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedServers]
port=" + 
+          System.out.println("[testGetConnectedServers] port=" + 
             ports[whichVM]);
-          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedServers]
serverMemberId=" + 
+          System.out.println("[testGetConnectedServers] serverMemberId=" + 
             getDistributedMember());
         }
       });
@@ -1436,10 +1444,11 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase
{
       assertTrue(ports[whichVM] != 0);
     }
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedServers]
create bridge client");
+    System.out.println("[testGetConnectedServers] create bridge client");
     Properties config = new Properties();
     config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     config.setProperty(DistributionConfig.LOCATORS_NAME, "");
+    properties = config;
     getSystem(config);
     getCache();
     
@@ -1447,7 +1456,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase
{
     factory.setScope(Scope.LOCAL);
 
     for (int i = 0; i < ports.length; i++) {
-      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedServers]
creating connectionpool for " + 
+      System.out.println("[testGetConnectedServers] creating connectionpool for " + 
         NetworkUtils.getServerHostName(host) + " " + ports[i]);
       int[] thisServerPorts = new int[] { ports[i] };
       ClientServerTestCase.configureConnectionPoolWithName(factory, NetworkUtils.getServerHostName(host),
thisServerPorts, false, -1, -1, null,"pooly"+i);
@@ -1489,7 +1498,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase
{
     assertEquals(host.getVMCount(), connectedServers.size());
     for (Iterator iter = connectedServers.keySet().iterator(); iter.hasNext();) {
       String connectedServer = (String) iter.next();
-      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedServers]
 value for connectedServer: " + 
+      System.out.println("[testGetConnectedServers]  value for connectedServer: " + 
                           connectedServers.get(connectedServer));
     }
   }
@@ -1522,7 +1531,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase
{
       vm.invoke(new CacheSerializableRunnable("Create bridge server") {
         public void run2() throws CacheException {
           // create BridgeServer in controller vm...
-          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetNotifiedClients]
Create BridgeServer");
+          System.out.println("[testGetNotifiedClients] Create BridgeServer");
           getSystem();
           AttributesFactory factory = new AttributesFactory();
           Region region = createRegion(name, factory.create());
@@ -1540,9 +1549,9 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase
{
           
           assertTrue(testGetNotifiedClients_port != 0);
       
-          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetNotifiedClients]
port=" + 
+          System.out.println("[testGetNotifiedClients] port=" + 
             ports[whichVM]);
-          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetNotifiedClients]
serverMemberId=" + 
+          System.out.println("[testGetNotifiedClients] serverMemberId=" + 
             getMemberId());
         }
       });
@@ -1550,17 +1559,18 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase
{
       assertTrue(ports[whichVM] != 0);
     }
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetNotifiedClients]
create bridge client");
+    System.out.println("[testGetNotifiedClients] create bridge client");
     Properties config = new Properties();
     config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     config.setProperty(DistributionConfig.LOCATORS_NAME, "");
-    getSystem(config);
+    properties = config;
+    getSystem();
     getCache();
     
     AttributesFactory factory = new AttributesFactory();
     factory.setScope(Scope.LOCAL);
 
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetNotifiedClients]
creating connection pool");
+    System.out.println("[testGetNotifiedClients] creating connection pool");
     ClientServerTestCase.configureConnectionPool(factory, NetworkUtils.getServerHostName(host),
ports, true, -1, -1, null);
     Region region = createRegion(name, factory.create());
     assertNotNull(getRootRegion().getSubregion(name));


Mime
View raw message