Add end-to-end benchmark tests

This commit is contained in:
Ken Hibino
2019-12-31 12:36:46 -08:00
parent 4376dc1e9d
commit 09ee8df5a0
2 changed files with 94 additions and 3 deletions

View File

@@ -12,14 +12,14 @@ import (
// This file defines test helper functions used by
// other test files.
func setup(t *testing.T) *redis.Client {
t.Helper()
func setup(tb testing.TB) *redis.Client {
tb.Helper()
r := redis.NewClient(&redis.Options{
Addr: "localhost:6379",
DB: 14,
})
// Start each test with a clean slate.
h.FlushDB(t, r)
h.FlushDB(tb, r)
return r
}