mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-11 15:04:02 +09:00
Mock queue backoff duration (#30553)
During testing, the backoff duration shouldn't be longer than other durations
This commit is contained in:
1 parent
dd8e6ae270
commit
bcbeb24dba
2 files changed
+10
-1
No files matched your search
@@ -250,6 +250,7 @@ func TestWorkerPoolQueueShutdown(t *testing.T) {
|
||||
|
||||
func TestWorkerPoolQueueWorkerIdleReset(t *testing.T) {
|
||||
defer test.MockVariableValue(&workerIdleDuration, 10*time.Millisecond)()
|
||||
defer mockBackoffDuration(10 * time.Millisecond)()
|
||||
|
||||
handler := func(items ...int) (unhandled []int) {
|
||||
time.Sleep(50 * time.Millisecond)
|
||||
|
||||
Reference in new issue
Block a user