public void testSevenInstances() throws Throwable {
doTest(7, 10);
}
private void doTest(final int size, final int loopCnt) throws Throwable {
WithholdingAppender withholdingAppender = null;
boolean failure = true;
try{
logger.info("doTest("+size+","+loopCnt+"): muting log output...");
withholdingAppender = WithholdingAppender.install();
doDoTest(size, loopCnt);
failure = false;
} finally {
if (withholdingAppender!=null) {
if (failure) {
logger.info("doTest("+size+","+loopCnt+"): writing muted log output due to failure...");
}
withholdingAppender.release(failure);
if (!failure) {
logger.info("doTest("+size+","+loopCnt+"): not writing muted log output due to success...");
}
}
logger.info("doTest("+size+","+loopCnt+"): unmuted log output.");