Class Overview
Runs a task at set intervals. Throws an AssertionFailedError if the
task does not return the desired result within the timeout period.
This is designed for testing asynchronous events on the server.
Summary
|
[Expand]
Inherited Methods |
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
Public Constructors
public
RepeatableTaskRunner
(long intervalMillis, long timeoutMillis)
Parameters
| intervalMillis
| the interval between successive runs of the task |
| timeoutMillis
| the total amount of time from the start of running a task until the
AssertionFailedError is thrown.
|
Public Methods
public
void
assertFalse
(String message, RepeatableTask task)
Runs the provided task at intervals. Throws an AssertionFailedError if the task doesn't
return false within the timeout provided.
Parameters
| message
| the failure message used if the task doesn't return false within the timeout |
| task
| a Callable which returns a Boolean |
Throws
| AssertionFailedError
| if the task does not return false before the timeout expires |
| Exception
| if the task itself throws an exception
|
Runs the provided task at intervals. Throws an AssertionFailedError if the task doesn't
return true within the timeout provided.
Parameters
| message
| the failure message used if the task doesn't return true within the timeout |
| task
| a Callable which returns a Boolean |
Throws
| AssertionFailedError
| if the task does not return true before the timeout expires |
| Exception
| if the task itself throws an exception
|