I have tests which run for 2 hours long and 10 minutes long.
I need to implement a timeout mechanism to prevent any runaway simulation.
I cannot put a global_timeout_value of 2 hours for all tests.
What is the best way to implement a timeout based on the duration of the tests
If the simulation run is normally 10 minutes, timeout should happen at 20 minutes
If the simulation run is normally 100 minutes, timeout should happen at 110 minutes
In reply to dvuvmsv:
you can implement the timeout mechanism on an interface which mainly use for posting/ reading transactions. If the environment doesn’t see activity on such an interface for a long time, then the environment should kick in the TIMEOUT mechanism. If the environment see any activity , refresh the Timer.
one of the way you can implement it using machine learning (script).
whenever the test passes, keep the test id and simulation time in separate file.
next time when you run the same test, set the timeout by reading this file and manipulate it to adjust the time and pass it on command line.