mirror of
https://github.com/hibiken/asynq.git
synced 2024-11-10 11:31:58 +08:00
Fix tests
This commit is contained in:
parent
d1f516d8f1
commit
f66a65d6ca
@ -8,7 +8,6 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/go-redis/redis/v7"
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"go.uber.org/goleak"
|
||||
)
|
||||
@ -18,10 +17,10 @@ func TestBackground(t *testing.T) {
|
||||
ignoreOpt := goleak.IgnoreTopFunction("github.com/go-redis/redis/v7/internal/pool.(*ConnPool).reaper")
|
||||
defer goleak.VerifyNoLeaks(t, ignoreOpt)
|
||||
|
||||
r := redis.NewClient(&redis.Options{
|
||||
r := &RedisClientOpt{
|
||||
Addr: "localhost:6379",
|
||||
DB: 15,
|
||||
})
|
||||
}
|
||||
client := NewClient(r)
|
||||
bg := NewBackground(r, &Config{
|
||||
Concurrency: 10,
|
||||
|
@ -15,7 +15,10 @@ import (
|
||||
|
||||
func TestClient(t *testing.T) {
|
||||
r := setup(t)
|
||||
client := NewClient(r)
|
||||
client := NewClient(&RedisClientOpt{
|
||||
Addr: "localhost:6379",
|
||||
DB: 14,
|
||||
})
|
||||
|
||||
task := NewTask("send_email", map[string]interface{}{"to": "customer@gmail.com", "from": "merchant@example.com"})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user