Package org.bladerunnerjs.utility

Examples of org.bladerunnerjs.utility.ProcessLogger.waitFor()


  public static void runCommand(BRJS brjs, ProcessBuilder processBuilder) throws CommandOperationException {
    try {
      Process process = processBuilder.start();
      ProcessLogger processLogger = new ProcessLogger(brjs, process, LogLevel.INFO, LogLevel.WARN, null);
      int exitCode = waitForProcess(process, brjs.logger(CommandRunnerUtility.class));
      processLogger.waitFor();
     
      if(exitCode != 0) throw new CommandOperationException("Error while running command '" +
          StringUtils.join(processBuilder.command(), " ") + "' (" + exitCode + ")");
    }
    catch(IOException | InterruptedException e) {
View Full Code Here


      Process process = runTime.exec(args);
      childProcesses.add(process);
     
      ProcessLogger processLogger = new ProcessLogger(brjs, process, LogLevel.WARN, LogLevel.ERROR, null);
      int exitCode = process.waitFor();
      processLogger.waitFor();
     
      if(!childProcesses.remove(process)) {
        logger.error("Failed to remove runTest process from child processes list");
      }
      logger.debug("Exit code is " + exitCode);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.