File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -278,6 +278,26 @@ var _ = Describe("Backend", func() {
278278 Expect (err ).To (Equal (iface .TaskQueueNotFound ))
279279 })
280280 })
281+ When ("the large queue exists" , func () {
282+ It ("can delete the queue" , func () {
283+ queue := testutil .MustCreateQueue (backend , SampleQueueSpec )
284+ // numOfTasks % chunkSize != 0 && numOfTasks > chunkSize
285+ numOfTasks := 12345
286+ for i := 0 ; i < numOfTasks ; i ++ {
287+ _ , err := backend .AddTask (context .Background (), QueueName , SampleTaskSpec )
288+ Expect (err ).NotTo (HaveOccurred ())
289+ }
290+
291+ Expect (backend .DeleteQueue (context .Background (), SampleQueueSpec .Name )).NotTo (HaveOccurred ())
292+
293+ queuesHash , err := client .HGetAll (backend .allQueuesKey ()).Result ()
294+ Expect (err ).NotTo (HaveOccurred ())
295+ Expect (len (queuesHash )).To (Equal (0 ))
296+ keys , err := client .Keys (backend .queueKey (queue .UID .String ()) + "*" ).Result ()
297+ Expect (err ).NotTo (HaveOccurred ())
298+ Expect (len (keys )).To (Equal (0 ))
299+ })
300+ })
281301 })
282302 })
283303
You can’t perform that action at this time.
0 commit comments