@Override public void stop() { if(!isStarted()) return; waitForAsynchronousJobToStop(); super.stop(); }
@Override public void stop() { if(!isStarted()) return; waitForAsynchronousJobToStop(); super.stop(); }
@Override public void stop() { if(!isStarted()) return; waitForAsynchronousJobToStop(compressionFuture, "compression"); waitForAsynchronousJobToStop(cleanUpFuture, "clean-up"); super.stop(); }
@Override public void stop() { if (!isStarted()) return; waitForAsynchronousJobToStop(compressionFuture, "compression"); waitForAsynchronousJobToStop(cleanUpFuture, "clean-up"); super.stop(); }
@Override public void stop() { if (!isStarted()) return; waitForAsynchronousJobToStop(compressionFuture, "compression"); waitForAsynchronousJobToStop(cleanUpFuture, "clean-up"); super.stop(); }
@Override public void stop() { if (!isStarted()) return; waitForAsynchronousJobToStop(compressionFuture, "compression"); waitForAsynchronousJobToStop(cleanUpFuture, "clean-up"); super.stop(); }
@Test public void stopTimeBasedRollingPolicy() { rfa.setContext(context); tbrp.setFileNamePattern(CoreTestConstants.OUTPUT_DIR_PREFIX + "toto-%d.log.zip"); tbrp.start(); rfa.setRollingPolicy(tbrp); rfa.start(); StatusPrinter.print(context); assertTrue(tbrp.isStarted()); assertTrue(rfa.isStarted()); rfa.stop(); assertFalse(rfa.isStarted()); assertFalse(tbrp.isStarted()); }
@Test public void extraIntegerTokenInFileNamePatternShouldBeDetected() { String pattern = "test-%d{yyyy-MM-dd'T'HH}-%i.log.zip"; tbrp.setFileNamePattern(pattern); tbrp.start(); assertFalse(tbrp.isStarted()); StatusChecker statusChecker = new StatusChecker(context); statusChecker.assertContainsMatch(Status.ERROR, "Filename pattern .{37} contains an integer token converter"); } }