Search in sources :

Example 6 with JavaSysMon

use of com.jezhumble.javasysmon.JavaSysMon in project gocd by gocd.

the class SubprocessLoggerTest method shouldNotLogAnythingWhenNoChildProcessesFound.

@Test
public void shouldNotLogAnythingWhenNoChildProcessesFound() {
    JavaSysMon sysMon = mock(JavaSysMon.class);
    logger = new SubprocessLogger(sysMon);
    try (LogFixture log = logFixtureFor(SubprocessLogger.class, Level.ALL)) {
        logger.run();
        assertThat(log.allLogs(), is(""));
    }
}
Also used : JavaSysMon(com.jezhumble.javasysmon.JavaSysMon) Test(org.junit.Test)

Aggregations

JavaSysMon (com.jezhumble.javasysmon.JavaSysMon)6 OsProcess (com.jezhumble.javasysmon.OsProcess)3 ProcessVisitor (com.jezhumble.javasysmon.ProcessVisitor)3 Test (org.junit.Test)3 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)2 RunIf (com.googlecode.junit.ext.RunIf)1 ProcessInfo (com.jezhumble.javasysmon.ProcessInfo)1 BuildCommand (com.thoughtworks.go.domain.BuildCommand)1 ArrayList (java.util.ArrayList)1