Skip to content

Fix codeflare-sdk python e2e tests to pick timeout #485

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

Merged

Conversation

Srihari1192
Copy link
Contributor

Issue link

closes https://issues.redhat.com/browse/RHOAIENG-4674

What changes have been made

Adjusted pytest section in pyproject.toml file to use timeout option for e2e tests

Verification steps

Check while running e2e tests timeout is with default timeout: 900.0s

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • Testing is not required for this change

Copy link
Collaborator

@ChristianZaccaria ChristianZaccaria left a comment

Choose a reason for hiding this comment

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

image

I thought this would work but when trying to run the tests it fails.

@ChristianZaccaria
Copy link
Collaborator

When running:
pip install -e .
pytest -v tests/unit_test.py::test_rc_status
I get the error.

When running:
poetry shell
pip install -e .
pytest -v tests/unit_test.py::test_rc_status
No errors encountered.

@Fiona-Waters
Copy link
Contributor

I am getting the error when running locally, both with poetry shell and then pytest -v tests/unit_test.py and without the shell.
image
Does this option allow for the timeout to be picked up?

[pytest]
timeout = 300

@Srihari1192
Copy link
Contributor Author

I am able to run both unit test and e2e test by installing with steps

poetry install --with test  
pytest -v tests/unit_test.py::test_rc_status

by declaring in pytest liek below its not picking timeout [pytest] timeout = 300

@ChristianZaccaria
Copy link
Collaborator

/lgtm thanks!

Copy link
Contributor

@Fiona-Waters Fiona-Waters left a comment

Choose a reason for hiding this comment

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

Errors down to local set up. When following instructions in readme to run tests everything works as expected.
/approve

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 20, 2024
@Fiona-Waters
Copy link
Contributor

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 20, 2024
Copy link
Contributor

openshift-ci bot commented Mar 20, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Fiona-Waters

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 415b938 into project-codeflare:main Mar 20, 2024
@Srihari1192 Srihari1192 deleted the fixPytestTimeout branch March 21, 2024 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants