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

Fix flaky acceptance tests #480

Open
filipowm opened this issue Jan 3, 2025 · 0 comments
Open

Fix flaky acceptance tests #480

filipowm opened this issue Jan 3, 2025 · 0 comments

Comments

@filipowm
Copy link
Contributor

filipowm commented Jan 3, 2025

As discussed in #461, several acceptance tests are experiencing flakiness, making it difficult to confidently review and merge PRs.

Common Issues:

  • Error during post-test destroy leading to dangling resources 1
  • Duplicate resource names causing tests to fail, like in example 2

Solutions

Temporary:

  • disable or mark flaky tests as allowed to fail until fixed to focus on achieving parity with other providers quickly

Long-term:

  • randomize resource names to avoid conflicts 3
  • address device allocation logic
  • debug and fix the post-test destroy issues

Footnotes

  1. Example run of dangling resources after post-destroy

  2. Example run of duplicate resource names

  3. Example of randomisation of the resource names

filipowm added a commit to filipowm/terraform-provider-unifi that referenced this issue Jan 3, 2025
filipowm added a commit to filipowm/terraform-provider-unifi that referenced this issue Jan 3, 2025
…estAccDataAccount_mac respectively to fix flakiness

References paultyng#480
joshuaspence pushed a commit that referenced this issue Jan 7, 2025
* fix: temporarily disable CheckDestroy in TestAccSite_basic causing test flakiness

References #480

* fix: generate random name and mac in TestAccDataAccount_default and TestAccDataAccount_mac respectively to fix flakiness

References #480

* chore: disable linter on testAccCheckSiteResourceDestroy
filipowm added a commit to filipowm/terraform-provider-unifi that referenced this issue Jan 8, 2025
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

No branches or pull requests

1 participant