mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-23 20:25:56 +00:00
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
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user