diff --git a/internal/notifications/apprise_confidentiality_test.go b/internal/notifications/apprise_confidentiality_test.go index b177468e76..2a08e73115 100644 --- a/internal/notifications/apprise_confidentiality_test.go +++ b/internal/notifications/apprise_confidentiality_test.go @@ -305,10 +305,10 @@ func TestAppriseQueueConfidentiality(t *testing.T) { t.Fatal(err) } q.SetProcessor(n.ProcessQueuedNotification) - q.processBatch() - // The autonomous worker can win the atomic claim. Its committed - // attempt audit, not the return from our stale snapshot, is proof - // the send completed. Stop processing before the retry wake. + // SetProcessor wakes the autonomous dispatcher. Do not also run + // a manual batch against the same pending snapshot: that can + // claim a retry before its scheduled wake. Observe the worker's + // committed audit, then pause retries before checking the row. deadline := time.Now().Add(3 * time.Second) for { var count int @@ -337,7 +337,7 @@ func TestAppriseQueueConfidentiality(t *testing.T) { wantStatus = QueueStatusDLQ } if gotStatus != string(wantStatus) || attempts != 1 || rawConfig != string(config) { - t.Error("queue lifecycle, attempt budget or admitted credentials changed") + t.Errorf("queue lifecycle: status=%s want=%s attempts=%d want=1 configUnchanged=%t", gotStatus, wantStatus, attempts, rawConfig == string(config)) } if status == http.StatusUnauthorized && (!lastError.Valid || !strings.Contains(lastError.String, "HTTP 401")) { t.Error("DLQ error observation was lost")