diff --git a/internal/alerts/pbs_datastore_override_alias_test.go b/internal/alerts/pbs_datastore_override_alias_test.go index 667c9329e2..7e488ff52d 100644 --- a/internal/alerts/pbs_datastore_override_alias_test.go +++ b/internal/alerts/pbs_datastore_override_alias_test.go @@ -12,6 +12,7 @@ import ( // must bridge the two so a UI-written override actually applies (#1591). func TestResolveStorageThresholds_HonorsCanonicalPBSDatastoreAlias(t *testing.T) { m := NewManagerWithDataDir(t.TempDir()) + t.Cleanup(m.Stop) m.UpdateConfig(AlertConfig{ Enabled: true, StorageDefault: HysteresisThreshold{Trigger: 85, Clear: 80}, diff --git a/internal/monitoring/monitor_alert_handling_test.go b/internal/monitoring/monitor_alert_handling_test.go index a1c0c6e12f..d1d88aac64 100644 --- a/internal/monitoring/monitor_alert_handling_test.go +++ b/internal/monitoring/monitor_alert_handling_test.go @@ -1071,6 +1071,7 @@ func TestMonitor_HandleAlertResolved_SuppressesRecoveryWhenFiringNeverDelivered( notifMgr.SetGroupingWindow(120) alertMgr := alerts.NewManager() + t.Cleanup(alertMgr.Stop) cfg := alertMgr.GetConfig() cfg.Enabled = true cfg.ActivationState = alerts.ActivationActive