ironcore-dev / ironcore-dev/metal-operator

Tests: Replace wall-clock DiscoveryTimeout with deterministic timing

Open
#652 0 comments 0 reactions 1 assignee View on GitHub

@asergeant01 is already working on this.

Since Feb 5, 2026.

area/metal-automation
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: ServerReconciler test 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.

Reported by: @asergeant01

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.