mirror of
https://github.com/hibiken/asynq.git
synced 2024-12-24 23:02:18 +08:00
Use different redis db for each package tests
This commit is contained in:
parent
28bfb6d83a
commit
998e761660
@ -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 {
|
||||||
|
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user