mirror of
https://github.com/hibiken/asynq.git
synced 2025-09-19 05:17:30 +08:00
Close redis client after each test run
This commit is contained in:
@@ -34,6 +34,7 @@ func BenchmarkEndToEndSimple(b *testing.B) {
|
||||
b.Fatalf("could not enqueue a task: %v", err)
|
||||
}
|
||||
}
|
||||
client.Close()
|
||||
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(count)
|
||||
@@ -80,6 +81,7 @@ func BenchmarkEndToEnd(b *testing.B) {
|
||||
b.Fatalf("could not enqueue a task: %v", err)
|
||||
}
|
||||
}
|
||||
client.Close()
|
||||
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(count * 2)
|
||||
@@ -151,6 +153,7 @@ func BenchmarkEndToEndMultipleQueues(b *testing.B) {
|
||||
b.Fatalf("could not enqueue a task: %v", err)
|
||||
}
|
||||
}
|
||||
client.Close()
|
||||
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(highCount + defaultCount + lowCount)
|
||||
@@ -221,6 +224,7 @@ func BenchmarkClientWhileServerRunning(b *testing.B) {
|
||||
|
||||
b.StopTimer() // begin teardown
|
||||
srv.Stop()
|
||||
client.Close()
|
||||
b.StartTimer() // end teardown
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user