Skip to content

Conversation

@Kcruz28
Copy link
Contributor

@Kcruz28 Kcruz28 commented Dec 5, 2025

Type of change

  • Bugfix

Description

This PR fixes a flaky test in KafkaMirrorMaker2AssemblyOperatorPodSetTest.java where testScaleDownCluster was failing intermittently due to non-deterministic ordering of the labelSelector string, generated from a HashMap. The flakiness was exposed using NonDex, a bytecode shuffling tool that revealed order-dependent failures. The fix updates the assertion to compare sets of labels instead of exact string matches, ensuring the test is order-independent while validating the correct labels are present. This eliminates false negatives in CI and improves test reliability without affecting production code

Checklist

Please go through this checklist and make sure all applicable tasks have been done

  • Write tests
  • Make sure all tests pass
  • Update documentation
  • Check RBAC rights for Kubernetes / OpenShift roles
  • Try your changes from Pod inside your Kubernetes and OpenShift cluster, not just locally
  • Reference relevant issue(s) and close them after merging
  • Update CHANGELOG.md
  • Supply screenshots for visual changes, such as Grafana dashboards

Signed-off-by: kcruz28 <[email protected]>
@Kcruz28 Kcruz28 force-pushed the fix-testScaleDownCluster-test branch from ae57162 to 528b9e9 Compare December 5, 2025 03:22
Copy link
Member

@scholzj scholzj left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. I do not think we ever saw this test be flaky in the CIs or locally. So I'm curious about the environment where you saw this being flaky.

@scholzj scholzj added this to the 0.50.0 milestone Dec 5, 2025
@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.79%. Comparing base (77d6103) to head (908ca36).
⚠️ Report is 40 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #12203      +/-   ##
============================================
+ Coverage     74.76%   74.79%   +0.02%     
- Complexity     6616     6630      +14     
============================================
  Files           377      377              
  Lines         25329    25360      +31     
  Branches       3394     3402       +8     
============================================
+ Hits          18938    18967      +29     
- Misses         5003     5006       +3     
+ Partials       1388     1387       -1     

see 13 files with indirect coverage changes

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

Signed-off-by: kcruz28 <[email protected]>
Copy link
Member

@scholzj scholzj left a comment

Choose a reason for hiding this comment

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

Thanks.

@scholzj scholzj requested a review from ppatierno December 5, 2025 19:42
@scholzj scholzj merged commit 6c68f5a into strimzi:main Dec 6, 2025
25 checks passed
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.

3 participants