This update introduces a timeout feature to the BashShell class to address the issue where TestPersistentShell hangs. The execute method now accepts a timeout parameter, defaulting to 10 seconds. If the command execution exceeds the specified timeout, the process is terminated gracefully.
Additionally, a new test case test_command_timeout has been added to ensure that commands which take too long are properly timed out. This test verifies that the command does not run beyond the specified timeout and that the appropriate timeout message is included in the output.
Closes #57
Thanks for using MentatBot. Give comments a :+1: or :-1: to help me improve!
This update introduces a timeout feature to the
BashShell
class to address the issue whereTestPersistentShell
hangs. Theexecute
method now accepts atimeout
parameter, defaulting to 10 seconds. If the command execution exceeds the specified timeout, the process is terminated gracefully.Additionally, a new test case
test_command_timeout
has been added to ensure that commands which take too long are properly timed out. This test verifies that the command does not run beyond the specified timeout and that the appropriate timeout message is included in the output.Closes #57
Thanks for using MentatBot. Give comments a :+1: or :-1: to help me improve!