ironcore-dev / ironcore-dev/metal-operator
Tests: Replace wall-clock DiscoveryTimeout with deterministic timing
@asergeant01 is already working on this.
Since Feb 5, 2026.
- Dominant language
- Go
- Stars
- 33
- Forks
- 30
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 28
Description
Context
The DiscoveryTimeout field in ServerReconciler currently relies on wall-clock time (time.Second) in tests, which can lead to flaky behavior on slower CI runners. Tests should be deterministic and not depend on timing assumptions.
Location
- File:
internal/controller/suite_test.go - Field:
DiscoveryTimeout(Line 201) - Component:
ServerReconcilertest setup
Issue
The test configuration sets DiscoveryTimeout: time.Second which makes envtest behavior dependent on real wall-clock time. This violates the principle that tests should be deterministic.
Background
This issue was identified during review of PR #536, though it is a pre-existing concern not introduced by that PR.
- Related PR: https://github.com/ironcore-dev/metal-operator/pull/536
- Review comment: https://github.com/ironcore-dev/metal-operator/pull/536#discussion_r2768513691
Reported by: @asergeant01
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.