@Test public void testGetIOStreamMsgs() { final String execCmd = System.getProperty("ExecLimitManagerPath") + System.getProperty("ExecLimitManagerScript") + " " + testPUI; try { if (cmdProcessBuilder.isMacOS() || cmdProcessBuilder.isUNIXLinux()) { initializeRuntimeProcess(execCmd); cmdPBSHelper = new CmdProcessBuilderStreamHelper(process.getInputStream(), "OUTPUT"); cmdPBSHelper.start(); Assert.assertNotNull(cmdPBSHelper); exitValueWaitFor = process.waitFor(); Assert.assertEquals(0, exitValueWaitFor); exitValue = process.exitValue(); Assert.assertEquals(0, exitValue); } if ((cmdPBSHelper != null) && !cmdPBSHelper.getIOStreamMessages().isEmpty()) { System.out.println("*** " + cmdPBSHelper.getIOStreamMessages()); Assert.assertTrue(cmdPBSHelper.getIOStreamMessages().contains(testPUI)); } } catch (InterruptedException e2) { System.err.println("InterruptedException: " + e2.getMessage()); e2.printStackTrace(); } }
public String getIOStreamMessages() { return buffer == null ? "" : buffer.toString(); }
CmdProcessBuilderStreamHelper extends Thread { public String getIOStreamMessages() { return buffer == null ? "" : buffer.toString(); } }
CmdProcessBuilderStreamHelper extends Thread { public String getIOStreamMessages() { return buffer == null ? "" : buffer.toString(); } CmdProcessBuilderStreamHelper(InputStream is, String type); }
CmdProcessBuilderStreamHelper extends Thread { public String getIOStreamMessages() { return buffer == null ? "" : buffer.toString(); } CmdProcessBuilderStreamHelper(InputStream is, String type); void run(); String getIOStreamMessages(); }
CmdProcessBuilderStreamHelper extends Thread { public String getIOStreamMessages() { return buffer == null ? "" : buffer.toString(); } CmdProcessBuilderStreamHelper(InputStream is, String type); void run(); String getIOStreamMessages();  }