Skip to content

test: de-flake DynamicGenericEventSourceRegistrationIT#3433

Open
csviri wants to merge 1 commit into
mainfrom
flaky-dyn-reg
Open

test: de-flake DynamicGenericEventSourceRegistrationIT#3433
csviri wants to merge 1 commit into
mainfrom
flaky-dyn-reg

Conversation

@csviri

@csviri csviri commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

The test captured the reconcile execution count while the create-triggered
reconcile cascade was still running (the first await only checked that the
ConfigMap and Secret existed, not that the system had quiesced), and asserted
an exact +2 executions after the external replace.

The reconciler re-writes the ConfigMap/Secret on every execution, so the number
of self-induced reconciles is timing-dependent, and after the read-after-write
filtering rework (#3414) the reconciler's own follow-up write is filtered, so a
deterministic +2 no longer holds.

Wait for the execution count to stabilize before capturing the baseline, and
assert only a lower bound (at least one more execution) after the replace.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

Copilot AI review requested due to automatic review settings June 19, 2026 08:30
@openshift-ci openshift-ci Bot requested review from metacosm and xstefank June 19, 2026 08:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR de-flakes DynamicGenericEventSourceRegistrationIT by avoiding race-prone assertions on reconciliation execution counts during a self-induced reconcile cascade, particularly after the read-after-write filtering rework in #3414.

Changes:

  • Waits for the reconciliation execution count to stabilize before capturing a baseline.
  • Replaces an exact “+2 executions” assertion with a lower-bound assertion after an external ConfigMap replace.
  • Strengthens the initial await by also asserting that both dynamic event sources have been registered.

Comment on lines +93 to 101
await()
.pollInterval(Duration.ofMillis(300))
.untilAsserted(
() -> {
assertThat(reconciler.getNumberOfExecutions() - executions).isEqualTo(2);
var current = reconciler.getNumberOfExecutions();
assertThat(current).isEqualTo(previous.getAndSet(current));
});
assertThat(reconciler.getNumberOfEventSources()).isEqualTo(2);
return reconciler.getNumberOfExecutions();
}
The test captured the reconcile execution count while the create-triggered
reconcile cascade was still running (the first await only checked that the
ConfigMap and Secret existed, not that the system had quiesced), and asserted
an exact +2 executions after the external replace.

The reconciler re-writes the ConfigMap/Secret on every execution, so the number
of self-induced reconciles is timing-dependent, and after the read-after-write
filtering rework (#3414) the reconciler's own follow-up write is filtered, so a
deterministic +2 no longer holds.

Wait for the execution count to stabilize before capturing the baseline, and
assert only a lower bound (at least one more execution) after the replace.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
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