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

test: parallelize tests #515

Merged
merged 8 commits into from
Jul 11, 2024
Merged

test: parallelize tests #515

merged 8 commits into from
Jul 11, 2024

Conversation

hmlanigan
Copy link
Member

@hmlanigan hmlanigan commented Jul 9, 2024

Description

Use the terraform plugin testing package ParallelTest to help speed up acceptance test time rather than a straight t.Parallel() call. Update make test targets to include -parallel 1. To enable parallel testing in this repository, work needs to be done with the GitHub runners. We need new self-hosted ones, or rewrite them not to use the charmed-kubernetes setup GitHub action.

A few tests needed updates to ensure that the model names were unique per run. Other tests needed to be updated to test ProviderUpgrade rather than doing nothing as they were.

Use 0.12.0 release to test Provider Upgrade, the panic seen sometimes with 0.10.1 has already been resolved there.

Type of change

  • Change in tests (one or several tests have been changed)

QA steps

Setup and run the tests with make testlxd and make testmicrok8s

Makefile Outdated Show resolved Hide resolved
internal/provider/validator_channel_test.go Outdated Show resolved Hide resolved
…ests"

This reverts commit 440cd6a, reversing
changes made to a14a1ed.
Use the terraform framework ParallelTests, rather than Test, to speed up
the test times.
Now that the acceptance tests use the ParallelTest method, setup our
test make targets to use by default. 5 is an arbitrary number.
@hmlanigan hmlanigan force-pushed the parallelize-tests branch 2 times, most recently from c92cdbd to 1a0a6f2 Compare July 10, 2024 15:03
Ensure test models have unique names when parallelization of test runs.
@hmlanigan hmlanigan added the hint/do-not-merge requires additional efforts, no merge label Jul 11, 2024
These tests were no longer useful. Update the 2 _Stables tests to be
_UpgradeProvider tests instead. Most other resources and data sources
already have them.

Change the version of the terraform provider to upgrade from to be
0.12.0 which is the last release. 0.10.1 is showing a panic which has
already been addressed.
Create a PARALLEL_TEST_COUNT which defaults to 3 to allow for
customizations to parallel testing by a user.

Rename EDGE_VERSION and make customizable by the user.
Running full out is causing juju failures right now, with the change to
ParallelTest. Try not running the tests with the capability.
@hmlanigan hmlanigan merged commit 6990325 into juju:main Jul 11, 2024
26 checks passed
@hmlanigan hmlanigan deleted the parallelize-tests branch July 11, 2024 18:23
@hmlanigan hmlanigan removed the hint/do-not-merge requires additional efforts, no merge label Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants