Package com.hp.lft.sdk
Class WaitUntilTestObjectState
java.lang.Object
com.hp.lft.sdk.WaitUntilTestObjectState
This class provides the waitUntil static method, which can be used to wait until an object reaches
a specific state.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
This interface exposes the evaluate method, which evaluates if an object in the AUT is currently in a specific state. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends TestObject>
booleanwaitUntil
(T testObject, WaitUntilTestObjectState.WaitUntilEvaluator<T> evaluator) Waits until the object in the AUT achieves the desired state (or until the object synchronization timeout (20 seconds) elapses.static <T extends TestObject>
booleanwaitUntil
(T testObject, WaitUntilTestObjectState.WaitUntilEvaluator<T> evaluator, long totalTimeOutInMilliseconds) Waits until the object in the AUT achieves the desired state or until the specified timeout elapses.
-
Field Details
-
DEFAULT_TIMEOUT
protected static long DEFAULT_TIMEOUT
-
-
Constructor Details
-
WaitUntilTestObjectState
public WaitUntilTestObjectState()
-
-
Method Details
-
waitUntil
public static <T extends TestObject> boolean waitUntil(T testObject, WaitUntilTestObjectState.WaitUntilEvaluator<T> evaluator, long totalTimeOutInMilliseconds) throws GeneralLeanFtException Waits until the object in the AUT achieves the desired state or until the specified timeout elapses. The state is evaluated by the provided WaitUntilEvaluator.- Type Parameters:
T
- the concrete TestObject type.- Parameters:
testObject
- the object whose state should be evaluated.evaluator
- theWaitUntilEvaluator
to use to evaluate the object state.totalTimeOutInMilliseconds
- the time (in milliseconds) to wait until the desired state is achieved.- Returns:
- true if the object achieved the desired state before the specified timeout, otherwise false.
- Throws:
GeneralLeanFtException
- if error occurs during execution
-
waitUntil
public static <T extends TestObject> boolean waitUntil(T testObject, WaitUntilTestObjectState.WaitUntilEvaluator<T> evaluator) throws GeneralLeanFtException Waits until the object in the AUT achieves the desired state (or until the object synchronization timeout (20 seconds) elapses. The state is evaluated by the WaitUntilEvaluator.- Type Parameters:
T
- the concrete TestObject type.- Parameters:
testObject
- the object whose state should be evaluated.evaluator
- theWaitUntilEvaluator
to use to evaluate the object state.- Returns:
- true if the object achieved the desired state within 20 seconds, otherwise false.
- Throws:
GeneralLeanFtException
- if error occurs during execution
-