diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2022-02-17 16:41:10 -0500 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2022-03-02 11:53:08 -0500 |
commit | 1682e78d2a63aa771a8209b46382c109bd78e84d (patch) | |
tree | 0e3afc9cc6ea28f6c6ed4014b54d6e417aa50a4a /tests/test_data/fake_plugins/timeout_test.py | |
parent | 686351fc6768104504ee14b9cad4140b65a420a2 (diff) | |
download | sos-1682e78d2a63aa771a8209b46382c109bd78e84d.tar.gz |
[tests] Add a test for non-default plugin_timeout compliance
There was a gap in our testing that allows #2863 to escape our notice -
that a `Plugin()`'s `plugin_timeout` attribute would be ignored if it
wasn't set to `TIMEOUT_DEFAULT`.
As that was resolved by #2864, add a test to ensure it remains working
as expected. The expected resolution order for a plugin's whole timeout
is as follows:
1. The value set by `-k plugin.timeout`
2. The value set by `--plugin-timeout`
3. The value hardcoded in the plugin via the `plugin_timeout` attr
4. `TIMEOUT_DEFAULT`
Related: #2863
Related: #2864
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Diffstat (limited to 'tests/test_data/fake_plugins/timeout_test.py')
-rw-r--r-- | tests/test_data/fake_plugins/timeout_test.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/test_data/fake_plugins/timeout_test.py b/tests/test_data/fake_plugins/timeout_test.py index 3a027c42..cfb148d7 100644 --- a/tests/test_data/fake_plugins/timeout_test.py +++ b/tests/test_data/fake_plugins/timeout_test.py @@ -13,6 +13,7 @@ class TimeoutTest(Plugin, IndependentPlugin): plugin_name = 'timeout_test' short_desc = 'Tests timeout functionality in test suite' + plugin_timeout = 100 def setup(self): |