/** Check for the the proper number of afterRemoteRegionCrashEvents */ public static void checkAfterRemoteRegionCrashEvents() { long numCrashEvents = ListenerBB.getBB().getSharedCounters().read(ListenerBB.numAfterRemoteRegionCrashEvents); long numVMsInDS = SplitBrainBB.getBB().getSharedCounters().read(SplitBrainBB.NumVMsInDS); long numVMsStopped = SplitBrainBB.getBB().getSharedCounters().read(SplitBrainBB.NumVMsStopped); // the number of expected crash events is: each vm that did not receive a forced disconnect gets // an event for the vm(s) that did receive a forced disconnect, plus the vm(s) that received // that // forced disconnect get an event for each of the surviving vms that have that region defined. // lynn - waiting for specification as to how many crash events to expect // long numExpectedCrashEvents = 2 * (numVMsInDS - numVMsStopped); long numExpectedCrashEvents = numVMsInDS - numVMsStopped; Log.getLogWriter() .info( "numVMsInDS: " + numVMsInDS + ", numVMsStopped: " + numVMsStopped + ", numExpectedCrashEvents: " + numExpectedCrashEvents); TestHelper.waitForCounter( ListenerBB.getBB(), "ListenerBB.numAfterRemoteRegionCrashEvents", ListenerBB.numAfterRemoteRegionCrashEvents, numExpectedCrashEvents, true, -1, 2000); }