2
0
mirror of https://github.com/hibiken/asynq.git synced 2025-10-26 11:16:12 +08:00

Return error if Unique TTL is less than 1s

This commit is contained in:
Ken Hibino
2021-11-09 15:53:48 -08:00
parent 531d1ef089
commit e2b61c9056
2 changed files with 11 additions and 1 deletions

View File

@@ -734,6 +734,11 @@ func TestClientEnqueueError(t *testing.T) {
task: NewTask("foo", nil),
opts: []Option{TaskID(" ")},
},
{
desc: "With unique option less than 1s",
task: NewTask("foo", nil),
opts: []Option{Unique(300 * time.Millisecond)},
},
}
for _, tc := range tests {