def __init__(self, test, maxElapsedTime, percentile=90, waitForCompletion=True): """ * Constructs a <code>TimedTest</code> to decorate the * specified test with the specified maximum elapsed time. * * @param test Test to decorate. * @param maxElapsedTime Maximum elapsed time (ms). * @param waitForCompletion <code>true</code> (default) to * indicate that the <code>TimedTest</code> should wait * for its decorated test to run to completion and then * fail if the maximum elapsed time was exceeded; * <code>false</code> to indicate that the * <code>TimedTest</code> should immediately signal * a failure when the maximum elapsed time is exceeded. """ TestDecorator.__init__(self, test) self.maxElapsedTime = maxElapsedTime self.percentile = percentile self.waitForCompletion = waitForCompletion self.maxElapsedTimeExceeded = False self.isQuiet = False self.test = test
def __init__(self, test, repeat): TestDecorator.__init__(self, test) if (repeat < 0): raise IllegalArgumentException("Repetition count must be > 0") self.test = test self.repeat = repeat