Package org.junit.rules

Examples of org.junit.rules.Timeout


    try {
      waitLonger = Integer.parseInt(System.getProperty("timeout.factor"));
    } catch (NumberFormatException exception) {
      log.warn("Could not parse timeout.factor, defaulting to no timeout.");
    }
    return new Timeout(waitLonger * defaultTimeoutSeconds() * 1000);
  }
View Full Code Here


    {
        int millisecondsTimeout = getTestTimeoutSecs() * 1000;

        if (isFailOnTimeout())
        {
            return new Timeout(millisecondsTimeout);
        }
        else
        {
            return new WarningTimeout(millisecondsTimeout);
        }
View Full Code Here

    {
        int millisecondsTimeout = getTestTimeoutSecs() * 1000;

        if (isFailOnTimeout())
        {
            return new Timeout(millisecondsTimeout);
        }
        else
        {
            return new WarningTimeout(millisecondsTimeout);
        }
View Full Code Here

public class Timeouts {

    public static final int TIMEOUT = 1000;

    public static Timeout forUnitTest() {
        return new Timeout(TIMEOUT);
    }
View Full Code Here

    public static final int END_TO_END_TEST = 5000;
    public static final int ASSERTION = 1000;

    public static Timeout forEndToEndTest() {
        return new Timeout(END_TO_END_TEST);
    }
View Full Code Here

    try {
      waitLonger = Integer.parseInt(System.getProperty("timeout.factor"));
    } catch (NumberFormatException exception) {
      log.warn("Could not parse timeout.factor, defaulting to no timeout.");
    }
    return new Timeout(waitLonger * defaultTimeoutSeconds() * 1000);
  }
View Full Code Here

  public static TestRule getTimeoutRule() {
    return getTimeoutRule(10000);
  }

  public static TestRule getTimeoutRule(int timeout) {
    return IS_DEBUG ? new TestName() : new Timeout(timeout);
  }
View Full Code Here

TOP

Related Classes of org.junit.rules.Timeout

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.