Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avocado Instrumented Test: introduce a multiplier for the timeout #5820

Merged
merged 2 commits into from Dec 7, 2023

Conversation

clebergnu
Copy link
Contributor

This introduces a "timeout factor", basically another parameter that Avocado Instrumented tests will respect that will be used to alter the actual timeout.

The reason for this feature is the fact that tests are coded with timeouts, but, their actual needed timeouts will depend on the environment they are running on. It's not OK to expect the test code to be modified when the environment changes significantly for an execution of the tests (say on faster or slower CPUs or networks).

@clebergnu clebergnu added the customer:QEMU Requirements/issues raised by the QEMU project label Nov 29, 2023
@clebergnu clebergnu self-assigned this Nov 29, 2023
@mr-avocado
Copy link

mr-avocado bot commented Nov 29, 2023

Dear contributor,
Avocado is currently under sprint #103, which is due to release an LTS (Long Term Stability) release.
Please avoid merging changes that do not fall into these categories:

  • Bug fixes
  • Usability Improvements
  • Documentation updates

As for the Avocado utility modules (“avocado.utils”) it is OK to introduce new functionality,
but changes to the existing APIs (including interface and behavior) should be avoided.
These kind of changes should wait until sprint #104.

@clebergnu
Copy link
Contributor Author

/packit copr-build

The section on test timeout spends too much energy on the varianter.
Let's use simple test parameters which are more than adequate for this
example.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
This introduces a "timeout factor", basically another parameter that
Avocado Instrumented tests will respect that will be used to alter the
actual timeout.

The reason for this feature is the fact that tests are coded with
timeouts, but, their actual needed timeouts will depend on the
environment they are running on.  It's not OK to expect the test code
to be modified when the environment changes significantly for an
execution of the tests (say on faster or slower CPUs or networks).

The implementation is done in a way that adds no new attributes or
methods to the avocado.Test class.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
Copy link
Contributor

@richtja richtja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @clebergnu, thank you for the updates, it LGTM.

@richtja richtja merged commit 5a3381a into avocado-framework:master Dec 7, 2023
62 of 63 checks passed
@richtja richtja mentioned this pull request Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer:QEMU Requirements/issues raised by the QEMU project
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants