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

NO-JIRA: Switch integration tests to ordered to save time #1823

Merged
merged 1 commit into from Mar 22, 2024

Conversation

JoelSpeed
Copy link
Contributor

On my machine, this reduces the runtime of the integration tests from about 28m to 6m.

The change here is that we install/uninstall the CRD file once per suite file, rather than once per test case.

We lose randomness of tests within each test suite file, but, the time saving is probably worth that.

Each suite file we have will still be randomised.

Copy link
Contributor

openshift-ci bot commented Mar 21, 2024

Hello @JoelSpeed! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

@JoelSpeed JoelSpeed changed the title Switch integration tests to ordered to save time NO-JIRA: Switch integration tests to ordered to save time Mar 21, 2024
@openshift-ci-robot
Copy link

@JoelSpeed: This pull request explicitly references no jira issue.

In response to this:

On my machine, this reduces the runtime of the integration tests from about 28m to 6m.

The change here is that we install/uninstall the CRD file once per suite file, rather than once per test case.

We lose randomness of tests within each test suite file, but, the time saving is probably worth that.

Each suite file we have will still be randomised.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 21, 2024
@openshift-ci openshift-ci bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 21, 2024
@openshift-ci openshift-ci bot requested review from sjenning and soltysh March 21, 2024 18:07
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 21, 2024
@hexfusion
Copy link
Contributor

hexfusion commented Mar 21, 2024

In terms of risk do we have/need a periodic test that would still fully randomize to gate nightly? The time saving is a big deal though 👍

image

vs ~36m

@JoelSpeed
Copy link
Contributor Author

To be honest, I think we don't need it no. The tests should all be isolated. After each test case we issue a DeleteAll to delete all resources of the kind we are working on. We are also using generateName. So in theory, every resource we create/attempt to create should have a clean slate and a unique name anyway, theoretically meaning every test is independent.

I think we are probably ok without the randomisation, I added it originally because it's a force of habit for normal testing that is more likely to have side effects from hangovers from other tests

@hexfusion
Copy link
Contributor

/lgtm

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

openshift-ci bot commented Mar 22, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hexfusion, JoelSpeed

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

@JoelSpeed
Copy link
Contributor Author

/label acknowledge-critical-fixes-only

@openshift-ci openshift-ci bot added the acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. label Mar 22, 2024
Copy link
Contributor

openshift-ci bot commented Mar 22, 2024

@JoelSpeed: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit 6187e2f into openshift:master Mar 22, 2024
9 checks passed
@openshift-bot
Copy link

[ART PR BUILD NOTIFIER]

This PR has been included in build ose-cluster-config-api-container-v4.16.0-202403221044.p0.g6187e2f.assembly.stream.el9 for distgit ose-cluster-config-api.
All builds following this will include this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants