Skip to content

test(e2e): add simple stress test suite#1188

Merged
keynslug merged 8 commits intomain-3.xfrom
test/e2e/mutation-tests
Apr 24, 2026
Merged

test(e2e): add simple stress test suite#1188
keynslug merged 8 commits intomain-3.xfrom
test/e2e/mutation-tests

Conversation

@keynslug
Copy link
Copy Markdown
Contributor

Summary

This PR focuses on a new basic stress test suite. This suite applies a short sequence of mutations to the EMQX CR under test in a quick succession and verifies that Operator handles them smoothly. Currently, only mutations are scaling cores and replicants up and down.

Apart from that, this PR:

  1. Fixes a minor issue with migrationTargetNodes(...) implementation.
  2. Simplifies and isolates Prometheus-related test-only code to the respective test group.
  3. Splits upgrade and stress test suites into their own packages.
  4. Adds CI job to run stress tests, with just 2 profiles for now.

This commit makes `migrationTargetNodes()` less conservative:
* Instead of relying on RS status fields, rely exclusively on instance
  status, avoiding occasionaly inconsistency.
* Return list of all replicant nodes if no cluster members belong to
  "update" replicant set, mirroring original intention.
This commit introduces test suite, aimed at stressing the
controller with frequent EMQX CR spec changes. Currently, it supports:
 * scaling core set up and down,
 * scaling replicants up and down.
This commit simplifies E2E test suite setup by moving Prometheus
related fixtures to its own related test group module.
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 77.33%. Comparing base (8806d49) to head (18e0cda).
⚠️ Report is 10 commits behind head on main-3.x.

Files with missing lines Patch % Lines
test/util/util.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           main-3.x    #1188      +/-   ##
============================================
+ Coverage     76.03%   77.33%   +1.29%     
============================================
  Files            48       48              
  Lines          3998     3948      -50     
============================================
+ Hits           3040     3053      +13     
+ Misses          799      742      -57     
+ Partials        159      153       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@keynslug keynslug marked this pull request as ready for review April 23, 2026 14:24
@keynslug keynslug force-pushed the test/e2e/mutation-tests branch from 6d6b91f to 3d4b9f4 Compare April 23, 2026 16:47
@keynslug keynslug force-pushed the test/e2e/mutation-tests branch from 3d4b9f4 to 18e0cda Compare April 23, 2026 16:54
@keynslug keynslug merged commit 334c644 into main-3.x Apr 24, 2026
16 checks passed
@keynslug keynslug deleted the test/e2e/mutation-tests branch April 24, 2026 07:35
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