Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

test: fix 60s hang in canonical store refresh test

rcourtmanf3d9f426c520
diff --git a/internal/monitoring/monitor_backups_readstate_test.go b/internal/monitoring/monitor_backups_readstate_test.go
index d71e6240fe..205170fe0e 100644
--- a/internal/monitoring/monitor_backups_readstate_test.go
+++ b/internal/monitoring/monitor_backups_readstate_test.go
@@ -225,7 +225,9 @@ func TestMonitorPollGuestSnapshots_RefreshesStaleCanonicalStoreForClusterGuest(t
}},
}
- m.pollGuestSnapshots(context.Background(), "homelab", client)
+ ctx, cancel := context.WithTimeout(context.Background(), 200*time.Millisecond)
+ defer cancel()
+ m.pollGuestSnapshots(ctx, "homelab", client)
if client.snapshotCalls == 0 {
t.Fatal("expected guest snapshot polling to use fresh clustered guest state")