Class TestRunTimeoutMonitor

java.lang.Object
java.lang.Thread
dev.galasa.framework.TestRunTimeoutMonitor
All Implemented Interfaces:
Runnable

public class TestRunTimeoutMonitor extends Thread
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.
  • 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 instance
      timeoutMinutes - the timeout duration in minutes
      Throws:
      FrameworkException - if the monitor cannot be initialized
  • Method Details

    • shutdown

      public void shutdown()
      Shuts down the timeout monitor thread.
    • run

      public void run()
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread