270271272273274275276277278279280
EditLogOutputStream stm = qjm.startLogSegment(4); try { waitForAllPendingCalls(qjm.getLoggerSetForTests()); } finally { stm.abort(); } // Make a new QJM qjm = new QuorumJournalManager(
326327328329330331332333334335336
fail("Did not fail even though 2/3 failed"); } catch (QuorumException qe) { GenericTestUtils.assertExceptionContains("mock failure", qe); } } finally { stm.abort(); } // Bring back the down JN. cluster.restartJournalNode(nodeMissingSegment);
479480481482483484485486487488489
// Should fail, because logger 1 had an injected fault and // logger 0 should detect writer out of sync GenericTestUtils.assertExceptionContains("Writer out of sync", qe); } finally { stm.abort(); qjm.close(); } // State: // Logger 0: 1-3 in-progress (since it missed finalize)