Search in sources :

Example 1 with ServerLogPatternListener

use of org.jboss.additional.testsuite.jdkall.present.shared.ServerLogPatternListener in project eap-additional-testsuite by jboss-set.

the class PooledCFAvailableOnStartupTestCase method test.

@Test
public void test() {
    ServerLogPatternListener listener = new ServerLogPatternListener(Pattern.compile(".*WFLYCTL0030.*"));
    Tailer serverLogTailer = new Tailer(SERVER_LOG, listener, 100, true);
    Thread tailerThread = new Thread(serverLogTailer);
    tailerThread.start();
    ServerReload.executeReloadAndWaitForCompletion(mc.getControllerClient());
    serverLogTailer.stop();
    Assert.assertTrue("Server log contains error messages caused by missing resource definitions!", listener.getMatchedLines().isEmpty());
}
Also used : Tailer(org.apache.commons.io.input.Tailer) ServerLogPatternListener(org.jboss.additional.testsuite.jdkall.present.shared.ServerLogPatternListener) Test(org.junit.Test)

Aggregations

Tailer (org.apache.commons.io.input.Tailer)1 ServerLogPatternListener (org.jboss.additional.testsuite.jdkall.present.shared.ServerLogPatternListener)1 Test (org.junit.Test)1