From 5e3eb985367c0d945b45a2e07b01e3fc37e7e18e Mon Sep 17 00:00:00 2001 From: Jake Hunsaker Date: Mon, 29 Mar 2021 11:04:46 -0400 Subject: [tests] Add a StageTwo timeout test Adds a test to ensure our timeout control is working properly. Signed-off-by: Jake Hunsaker --- tests/test_data/fake_plugins/timeout_test.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/test_data/fake_plugins/timeout_test.py (limited to 'tests/test_data/fake_plugins/timeout_test.py') diff --git a/tests/test_data/fake_plugins/timeout_test.py b/tests/test_data/fake_plugins/timeout_test.py new file mode 100644 index 00000000..3a027c42 --- /dev/null +++ b/tests/test_data/fake_plugins/timeout_test.py @@ -0,0 +1,21 @@ +# This file is part of the sos project: https://github.com/sosreport/sos +# +# This copyrighted material is made available to anyone wishing to use, +# modify, copy, or redistribute it subject to the terms and conditions of +# version 2 of the GNU General Public License. +# +# See the LICENSE file in the source distribution for further information. + +from sos.report.plugins import Plugin, IndependentPlugin + + +class TimeoutTest(Plugin, IndependentPlugin): + + plugin_name = 'timeout_test' + short_desc = 'Tests timeout functionality in test suite' + + + def setup(self): + self.add_cmd_output('sleep 15') + self.add_cmd_output('echo I slept great', suggest_filename='echo_good') + self.add_cmd_output('sleep 30', timeout=10) -- cgit