Package org.apache.tools.ant.taskdefs

Examples of org.apache.tools.ant.taskdefs.ExecuteWatchdog


  protected ExecuteWatchdog createWatchdog() /*throws BuildException*/ {
    if(m_timeout == null) {
      return null;
    }

    return new ExecuteWatchdog(m_timeout.longValue());
  }
View Full Code Here


    createClasspath().setLocation(findJar());

    cmd.createArgument().setValue("@" + fileName);

    ExecuteWatchdog watchdog= createWatchdog();
    boolean wasKilled= false;
    int exitValue= executeAsForked(cmd, watchdog);
    if(null != watchdog) {
      wasKilled= watchdog.killedProcess();
    }

    actOnResult(exitValue, wasKilled);
  }
View Full Code Here

  protected ExecuteWatchdog createWatchdog() /*throws BuildException*/ {
    if(m_timeout == null) {
      return null;
    }

    return new ExecuteWatchdog(m_timeout.longValue());
  }
View Full Code Here

        // execute the test and get the return code
        TestResultHolder result = null;
        if (!test.getFork()) {
            result = executeInVM(test);
        } else {
            ExecuteWatchdog watchdog = createWatchdog();
            result = executeAsForked(test, watchdog, null);
            // null watchdog means no timeout, you'd better not check with null
        }
        actOnTestResult(result, test, "Test " + test.getName());
    }
View Full Code Here

            writer.flush();
            writer.close();
            writer = null;

            // execute the test and get the return code
            ExecuteWatchdog watchdog = createWatchdog();
            TestResultHolder result =
                executeAsForked(test, watchdog, casesFile);
            actOnTestResult(result, test, "Tests");
        } catch (IOException e) {
            log(e.toString(), Project.MSG_ERR);
View Full Code Here

     */
    protected ExecuteWatchdog createWatchdog() throws BuildException {
        if (timeout == null) {
            return null;
        }
        return new ExecuteWatchdog((long) timeout.intValue());
    }
View Full Code Here

        final EOFAwareInputStream processErrorStream = eofAwareInputStreamFactory.create(process.getErrorStream());
        final Collection<EOFAwareInputStream> processStreams = asList(processOutputStream, processErrorStream);

        final ExecuteStreamHandler streamHandler = executeStreamHandlerFactory.create(processOutputStream, processErrorStream, process.getOutputStream());

        final ExecuteWatchdog watchdog = watchdogFactory.create(config);
        watchdog.start(process);

        return new ManagedProcess(process, destroyer, streamHandler, watchdog, processStreams, executorService);
    }
View Full Code Here

public class ExecuteWatchdogFactory
{
    public ExecuteWatchdog create(final ParallelJUnitTaskConfig config)
    {
        final long timeout = config.getTimeout();
        return timeout > 0 ? new ExecuteWatchdog(timeout) : NoOpExecuteWatchdog.INSTANCE;
    }
View Full Code Here

        // execute the test and get the return code
        TestResultHolder result = null;
        if (!test.getFork()) {
            result = executeInVM(test);
        } else {
            ExecuteWatchdog watchdog = createWatchdog();
            result = executeAsForked(test, watchdog, null);
            // null watchdog means no timeout, you'd better not check with null
        }
        actOnTestResult(result, test, "Test " + test.getName());
    }
View Full Code Here

            writer.flush();
            writer.close();
            writer = null;

            // execute the test and get the return code
            ExecuteWatchdog watchdog = createWatchdog();
            TestResultHolder result =
                executeAsForked(test, watchdog, casesFile);
            actOnTestResult(result, test, "Tests");
        } catch (IOException e) {
            log(e.toString(), Project.MSG_ERR);
View Full Code Here

TOP

Related Classes of org.apache.tools.ant.taskdefs.ExecuteWatchdog

Copyright © 2018 www.massapicom. 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.