fix(test): stop the Windows test job from failing at random (#6182)

* fix(persistence): don't format a nil-model row in wrapCursor

* test(plugins): assert task queue delay against the first dispatch, not consecutive gaps

* test(artwork): let the e2e worker wait outlast one retry

* chore: trim comments

* fix(persistence): guard dbFolder and dbMediaFile String() against a nil model
This commit is contained in:
Deluan Quintão 2026-09-20 15:27:20 -04:00 • committed by GitHub
commit 0429fb3d40
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 39 additions and 6 deletions

View file

@ -689,11 +689,12 @@ var _ = Describe("TaskQueueService", func() {
copy(times, dispatchTimes)
mu.Unlock()
// Consecutive dispatches should have at least ~160ms gap (80% of 200ms)
// Wake-up latency varies per worker, so check offsets from the first dispatch, not gaps.
for i := 1; i < len(times); i++ {
gap := times[i].Sub(times[i-1])
Expect(gap).To(BeNumerically(">=", 160*time.Millisecond),
fmt.Sprintf("gap between dispatch %d and %d was %v, expected >= 160ms", i-1, i, gap))
offset := times[i].Sub(times[0])
minOffset := time.Duration(i)*200*time.Millisecond - 50*time.Millisecond
Expect(offset).To(BeNumerically(">=", minOffset),
fmt.Sprintf("dispatch %d ran %v after the first, expected >= %v", i, offset, minOffset))
}
})
})