geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From upthewatersp...@apache.org
Subject [44/50] [abbrv] incubator-geode git commit: GEODE-295 - Expecting a suspect string in BridgeMembershipDUnitTet
Date Wed, 09 Sep 2015 23:59:27 GMT
GEODE-295 - Expecting a suspect string in BridgeMembershipDUnitTet

testBridgeMembershipEventsInClient already had some code to expect the
suspect string, but it was writing to a weirdly constructed logger, so I
think it was not actually taking effect.


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

Branch: refs/heads/feature/GEODE-12
Commit: 141512c5cf5e8f1896e05bff064d6d11661e29eb
Parents: 0c13b4d
Author: Dan Smith <upthewaterspout@apache.org>
Authored: Tue Sep 1 09:07:16 2015 -0700
Committer: Dan Smith <upthewaterspout@apache.org>
Committed: Tue Sep 1 09:07:16 2015 -0700

----------------------------------------------------------------------
 .../cache30/BridgeMembershipDUnitTest.java      | 38 ++++++--------------
 1 file changed, 10 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/141512c5/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/BridgeMembershipDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/BridgeMembershipDUnitTest.java
b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/BridgeMembershipDUnitTest.java
index 7f6af30..ca7a439 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/BridgeMembershipDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/BridgeMembershipDUnitTest.java
@@ -719,6 +719,7 @@ public class BridgeMembershipDUnitTest extends BridgeTestCase {
    * crashes or departs gracefully, the client will detect this as a crash.
    */
   public void testBridgeMembershipEventsInClient() throws Exception {
+    addExpectedException("IOException");
     final boolean[] fired = new boolean[3];
     final DistributedMember[] member = new DistributedMember[3];
     final String[] memberId = new String[3];
@@ -876,35 +877,16 @@ public class BridgeMembershipDUnitTest extends BridgeTestCase {
     assertFalse(isClient[CRASHED]);
     resetArraysForTesting(fired, member, memberId, isClient);
 
-//    String expected = "dead server list" +
-//                      "||live server list" +
-//                      "||java.io.IOException";
-    String expected = "java.io.IOException";
-    String addExpected = 
-      "<ExpectedException action=add>" + expected + "</ExpectedException>";
-    String removeExpected = 
-      "<ExpectedException action=remove>" + expected + "</ExpectedException>";
-      
-    LogWriter bgexecLogger =
-          new LocalLogWriter(InternalLogWriter.ALL_LEVEL, System.out);
-    bgexecLogger.info(addExpected);
-    getLogWriter().info(addExpected);
-    try {
-      vm0.invoke(new SerializableRunnable("Stop BridgeServer") {
-        public void run() {
-          getLogWriter().info("[testBridgeMembershipEventsInClient] Stop BridgeServer");
-          stopBridgeServers(getCache());
-        }
-      });
-      synchronized(listener) {
-        if (!fired[JOINED] && !fired[CRASHED]) {
-          listener.wait(60 * 1000);
-        }
+    vm0.invoke(new SerializableRunnable("Stop BridgeServer") {
+      public void run() {
+        getLogWriter().info("[testBridgeMembershipEventsInClient] Stop BridgeServer");
+        stopBridgeServers(getCache());
+      }
+    });
+    synchronized(listener) {
+      if (!fired[JOINED] && !fired[CRASHED]) {
+        listener.wait(60 * 1000);
       }
-    }
-    finally {
-      bgexecLogger.info(removeExpected);
-      getLogWriter().info(removeExpected);
     }
     
     getLogWriter().info("[testBridgeMembershipEventsInClient] assert client detected server
departure");


Mime
View raw message