Package com.tibco.ep.testing.framework
Class Timeout
java.lang.Object
com.tibco.ep.testing.framework.Timeout
Tools to abort long running test and call a node snapshot
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) void
end()
Cancel the timeout for the test case(package private) void
Take a node snapshot(package private) void
setTimeoutBehavior
(Runnable runnable) Override the default behavior to create node snapshot and exit the jvm(package private) void
setTimoutSeconds
(long timeoutSeconds) Override the default timeout(package private) void
start
(long timeoutSeconds) Start timeout for this test case(package private) void
Wait for snapshot command to complete
-
Constructor Details
-
Timeout
Timeout()Constructor
-
-
Method Details
-
start
void start(long timeoutSeconds) Start timeout for this test case
This method can be run within or outside a transaction
- Parameters:
timeoutSeconds
- timeout in seconds
-
end
void end()Cancel the timeout for the test case
This method can be run within or outside a transaction
-
setTimeoutBehavior
Override the default behavior to create node snapshot and exit the jvm
- Parameters:
runnable
- code to execute on timeout
-
setTimoutSeconds
void setTimoutSeconds(long timeoutSeconds) Override the default timeout
- Parameters:
timeoutSeconds
- Timeout in seconds - most be greater than zero
-
runSnapshot
void runSnapshot()Take a node snapshotN.B. - package private to support unit testing
-
waitForCompletion
void waitForCompletion()Wait for snapshot command to completeN.B. - used for unit testing only
-