| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
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:
Sorry, something went wrong.
| 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>
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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