2
0
mirror of https://github.com/hibiken/asynq.git synced 2024-12-25 07:12:17 +08:00

Use different redis db for each package tests

This commit is contained in:
Ken Hibino 2019-12-04 07:38:55 -08:00
parent 28bfb6d83a
commit 998e761660
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ func setup(t *testing.T) *redis.Client {
t.Helper() t.Helper()
r := redis.NewClient(&redis.Options{ r := redis.NewClient(&redis.Options{
Addr: "localhost:6379", Addr: "localhost:6379",
DB: 15, DB: 14,
}) })
// Start each test with a clean slate. // Start each test with a clean slate.
if err := r.FlushDB().Err(); err != nil { if err := r.FlushDB().Err(); err != nil {

View File

@ -21,7 +21,7 @@ func setup(t *testing.T) *RDB {
t.Helper() t.Helper()
r := NewRDB(redis.NewClient(&redis.Options{ r := NewRDB(redis.NewClient(&redis.Options{
Addr: "localhost:6379", Addr: "localhost:6379",
DB: 15, DB: 13,
})) }))
// Start each test with a clean slate. // Start each test with a clean slate.
if err := r.client.FlushDB().Err(); err != nil { if err := r.client.FlushDB().Err(); err != nil {