• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

SchSeba / sriov-network-operator-1 / 28483543464
64%
master: 64%

Build:
Build:
LAST BUILD BRANCH: conditions/network-crds
DEFAULT BRANCH: master
Ran 01 Jul 2026 12:04AM UTC
Jobs 1
Files 110
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

30 Jun 2026 04:31PM UTC coverage: 63.773% (-0.007%) from 63.78%
28483543464

push

github

SchSeba
fix(daemon): prevent test suite timeout flake during cleanup

The daemon test suite was flaking in CI because the envtest API server's
watch connection would intermittently break mid-run. When this happened:

1. The informer's watch disconnected during test execution
2. BeforeEach deleted and recreated the SriovNetworkNodeState object
3. On reflector reconnect, the re-list delivered the new object as an
   Update event (same key, different resourceVersion)
4. The controller's predicates (AnnotationChangedPredicate |
   GenerationChangedPredicate) filtered the event because both the old
   cached object and new object had identical generation (1) and drain
   annotations (DrainIdle)
5. The reconciler was never triggered, causing BeforeEach to hang waiting
   for SyncStatus == Succeeded

This is a test-only issue. In production, nodeStates are never
delete+recreated with pre-set drain annotations. The drain controller
adds annotations after creation, which always triggers the
AnnotationChangedPredicate.

Fix:
- Add a unique incrementing annotation (test.sriov.openshift.io/create-seq)
  to each newly created nodeState so the AnnotationChangedPredicate always
  passes after a re-list
- Bump this annotation on each poll iteration in BeforeEach so the
  informer sees a changed annotation whenever it reconnects
- Reduce retryTime from 5s to 1s so the annotation is bumped more
  frequently and the reconciler is triggered faster
- Set waitTime to 5 minutes (well under Go's 10m test timeout) to give
  the reflector adequate reconnection time in worst-case scenarios
- Register DeferCleanup(cancel) last in BeforeAll LIFO order to ensure
  the parent context is canceled before other cleanup, allowing the
  manager and podRecreator goroutines to exit promptly

Signed-off-by: Sebastian Sch <sebassch@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

9712 of 15229 relevant lines covered (63.77%)

0.71 hits per line

Coverage Regressions

Lines Coverage ∆ File
5
72.92
-5.21% pkg/daemon/status.go
Jobs
ID Job ID Ran Files Coverage
1 28483543464.1 01 Jul 2026 12:04AM UTC 110
63.77
GitHub Action Run
Source Files on build 28483543464
  • Tree
  • List 110
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #28483543464
  • 9b0f90ae on github
  • Prev Build on master (#28447062572)
  • Next Build on fix/daemon-test-flake (#28503380159)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc