|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.functest.framework.JiraTestWatchDog
public class JiraTestWatchDog
This class basically listens to tests and fires a callback if a test does not complete with the configured time. The callback can be repeatably invoked after the initial timeout at a fixed interval.
Constructor Summary | |
---|---|
JiraTestWatchDog(com.google.common.base.Predicate<WebTestDescription> monitorPredicate,
long timeout,
long repeatDelay,
TimeUnit unit,
int repeatMax,
com.google.common.base.Function<WebTestDescription,?> timeoutCallable)
Create a watchdog that will watch the tests and fire the passed callback for any tests that do not complete within the specified amount of time. |
Method Summary | |
---|---|
void |
close()
|
void |
suiteFinished(WebTestDescription suiteDescription)
Called when the whole web test suite is going finishing. |
void |
suiteStarted(WebTestDescription suiteDescription)
Called when the whole web test suite is going to start. |
void |
testError(WebTestDescription description,
Throwable t)
Called when test ends with an error |
void |
testFailure(WebTestDescription test,
Throwable t)
Called on test finished with an assertion failure. |
void |
testFinished(WebTestDescription test)
Called on finished web test. |
void |
testStarted(WebTestDescription test)
Called on start of a single web test. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JiraTestWatchDog(com.google.common.base.Predicate<WebTestDescription> monitorPredicate, long timeout, long repeatDelay, TimeUnit unit, int repeatMax, com.google.common.base.Function<WebTestDescription,?> timeoutCallable)
monitorPredicate
- will only monitor tests for which the predicate returns true.timeout
- the time we should wait for a test to finish before it is considered to have frozen.repeatDelay
- the delay between taking thread dumps once the timeout has passed.unit
- the unit of the timeout and repeatDelay.repeatMax
- the number of times to execute the callable.timeoutCallable
- this callback is invokedMethod Detail |
---|
public void suiteStarted(WebTestDescription suiteDescription)
WebTestListener
suiteStarted
in interface WebTestListener
suiteDescription
- description of the whole suitepublic void suiteFinished(WebTestDescription suiteDescription)
WebTestListener
suiteFinished
in interface WebTestListener
suiteDescription
- description of the whole suitepublic void testError(WebTestDescription description, Throwable t)
WebTestListener
testError
in interface WebTestListener
description
- test descriptiont
- errorpublic void testFailure(WebTestDescription test, Throwable t)
WebTestListener
testFailure
in interface WebTestListener
test
- test descriptiont
- failurepublic void testFinished(WebTestDescription test)
WebTestListener
testFinished
in interface WebTestListener
test
- test descriptionpublic void testStarted(WebTestDescription test)
WebTestListener
testStarted
in interface WebTestListener
test
- test descriptionpublic void close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |