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.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Stabilize TrueNAS timeout recovery test
rcourtmanfe0074c37277
diff --git a/internal/monitoring/truenas_poller_test.go b/internal/monitoring/truenas_poller_test.goindex f3e508248f..dc609a7e89 100644--- a/internal/monitoring/truenas_poller_test.go+++ b/internal/monitoring/truenas_poller_test.go@@ -860,6 +860,7 @@ func TestTrueNASPollerAPITimeout(t *testing.T) {var requestCount atomic.Int64var injectDelay atomic.Bool+ var recoverySuccesses atomic.Int64injectDelay.Store(true)server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {@@ -880,6 +881,9 @@ func TestTrueNASPollerAPITimeout(t *testing.T) {case "/api/v2.0/disk":_, _ = w.Write([]byte(`[]`))case "/api/v2.0/alert/list":+ if !injectDelay.Load() {+ recoverySuccesses.Add(1)+ }_, _ = w.Write([]byte(`[]`))default:http.NotFound(w, r)@@ -903,11 +907,10 @@ func TestTrueNASPollerAPITimeout(t *testing.T) {}, "expected poller to continue retrying while API requests time out")injectDelay.Store(false)- recoveryStart := requestCount.Load()waitForCondition(t, 3*time.Second, func() bool {- return requestCount.Load() >= recoveryStart+5- }, "expected at least one successful poll cycle after timeout clears")+ return recoverySuccesses.Load() > 0 && hasTrueNASHostForOrg(poller, "default", "timeout-host")+ }, "expected at least one successful poll cycle to ingest TrueNAS resources after timeout clears")poller.Stop()if !hasTrueNASHostForOrg(poller, "default", "timeout-host") {