188189190191192193194195196197198
} finally { if (cluster != null) { cluster.shutdown(); } if (mjc != null) { mjc.shutdown(); } } } /**
119120121122123124125126127128129
ret = ipcCounts.first(); LOG.info("Max IPC count = " + ret); } finally { IOUtils.closeStream(qjm); cluster.shutdown(); } return ret; } /**
174175176177178179180181182183184
// Test failure! Rethrow with the test setup info so it can be // easily triaged. throw new RuntimeException("Test failed with injection: " + injectionStr, t); } finally { cluster.shutdown(); cluster = null; IOUtils.closeStream(qjm); qjm = null; } }
268269270271272273274275276277278
} finally { qjm.close(); } } } finally { cluster.shutdown(); } } private void checkException(Throwable t) { GenericTestUtils.assertExceptionContains("Injected", t);
979899100101102103104105106107
assertTrue("New epoch " + newEpoch + " should be greater than previous " + prevEpoch, newEpoch > prevEpoch); prevEpoch = newEpoch; } } finally { cluster.shutdown(); } } private class FaultyLoggerFactory implements AsyncLogger.Factory { @Override
118119120121122123124125126127128
173174175176177178179180181182183
267268269270271272273274275276277
+ " should be greater than previous " + prevEpoch, newEpoch > prevEpoch); prevEpoch = newEpoch; } } finally { cluster.shutdown(); } } private class FaultyLoggerFactory implements AsyncLogger.Factory { @Override