mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-23 20:25:56 +00:00
Let the Apprise confidentiality fixture use one queue dispatcher
SetProcessor already wakes the autonomous queue worker. Observe its committed attempt audit without launching a competing manual batch, keeping all lifecycle, retry-budget, config, failure-class and confidentiality assertions. Report changed lifecycle fields without printing credentials. Change-source: pulse-maintainer
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user