Package dev.galasa.framework
Class TestRunTimeoutMonitor
java.lang.Object
java.lang.Thread
dev.galasa.framework.TestRunTimeoutMonitor
- All Implemented Interfaces:
Runnable
A thread that monitors the test run duration and interrupts the test if it exceeds
the configured timeout period. This helps prevent tests from hanging indefinitely.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTestRunTimeoutMonitor(IFramework framework, long timeoutMinutes, ITimeService timeService) Creates a new timeout monitor for a test run. -
Method Summary
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Constructor Details
-
TestRunTimeoutMonitor
protected TestRunTimeoutMonitor(IFramework framework, long timeoutMinutes, ITimeService timeService) throws FrameworkException Creates a new timeout monitor for a test run.- Parameters:
framework- the framework instancetimeoutMinutes- the timeout duration in minutes- Throws:
FrameworkException- if the monitor cannot be initialized
-
-
Method Details