func setup(client redis.AsyncClient) { fr, e := client.Flushdb() if e != nil { log.Println("Error creating client for worker: ", e) log.Println("fr: ", fr) panic(e) } frr, e2 := fr.Get() if e2 != nil { log.Println("Error creating client for worker: ", e2) log.Println("frr: ", frr) panic(e) } }
func FlushAsyncClient(t *testing.T, client redis.AsyncClient) { // flush it fstat, e := client.Flushdb() if e != nil { t.Fatalf("on Flushdb - %s", e) } ok, fe := fstat.Get() if fe != nil { t.Fatalf("on fstat.Get() - %s", fe) } if !ok { t.Fatalf("fstat.Get() returned false") } }