From 5c6e826cc49825fb235a3c5b68a798c8e8081be8 Mon Sep 17 00:00:00 2001 From: "pulse-triage[bot]" <249995291+pulse-triage[bot]@users.noreply.github.com> Date: Thu, 1 Oct 2026 03:43:28 +0100 Subject: [PATCH] Advance the partial-reporting fixture through due poll cycles Drive each modeled response through a due deadline instead of zeroing it, which legitimately reconstructs the existing future cadence. The production scheduling policy is unchanged. Contract-Neutral: Test-only due-deadline setup for the telemetry pipeline; production polling and API unchanged. Change-source: pulse-maintainer --- internal/monitoring/truenas_poller_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/monitoring/truenas_poller_test.go b/internal/monitoring/truenas_poller_test.go index 145bfa6133..e0af04581f 100644 --- a/internal/monitoring/truenas_poller_test.go +++ b/internal/monitoring/truenas_poller_test.go @@ -2272,7 +2272,9 @@ func TestTrueNASPartialReportingPipeline(t *testing.T) { observedAt := time.Now().UTC().Add(-10 * time.Minute).Truncate(time.Second) for index, cycle := range cycles { current.Store(int64(index)) - poller.ensureConnectionRuntimeStatusLocked("default", instance.ID).nextPollAt = time.Time{} + // Model the next due poll, not an absent deadline: a zero deadline + // is deliberately reconstructed from the previous attempt's cadence. + poller.ensureConnectionRuntimeStatusLocked("default", instance.ID).nextPollAt = time.Now().Add(-time.Second) poller.pollAll(context.Background()) summary := poller.ConnectionSummaries("default", []config.TrueNASInstance{instance})[instance.ID] if summary.Poll == nil || summary.Poll.LastSuccessAt == nil || summary.Poll.LastError != nil || summary.Poll.ConsecutiveFailures != 0 || summary.Observed == nil || summary.Observed.StoragePools != 1 {