diff options
Diffstat (limited to 'src/pkg/database/sql')
| -rw-r--r-- | src/pkg/database/sql/sql_test.go | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/pkg/database/sql/sql_test.go b/src/pkg/database/sql/sql_test.go index 693f5e3a3c..2a059da453 100644 --- a/src/pkg/database/sql/sql_test.go +++ b/src/pkg/database/sql/sql_test.go @@ -39,15 +39,7 @@ const fakeDBName = "foo" var chrisBirthday = time.Unix(123456789, 0) -type testOrBench interface { - Fatalf(string, ...interface{}) - Errorf(string, ...interface{}) - Fatal(...interface{}) - Error(...interface{}) - Logf(string, ...interface{}) -} - -func newTestDB(t testOrBench, name string) *DB { +func newTestDB(t testing.TB, name string) *DB { db, err := Open("test", fakeDBName) if err != nil { t.Fatalf("Open: %v", err) @@ -69,14 +61,14 @@ func newTestDB(t testOrBench, name string) *DB { return db } -func exec(t testOrBench, db *DB, query string, args ...interface{}) { +func exec(t testing.TB, db *DB, query string, args ...interface{}) { _, err := db.Exec(query, args...) if err != nil { t.Fatalf("Exec of %q: %v", query, err) } } -func closeDB(t testOrBench, db *DB) { +func closeDB(t testing.TB, db *DB) { if e := recover(); e != nil { fmt.Printf("Panic: %v\n", e) panic(e) @@ -1061,7 +1053,7 @@ func TestStmtCloseOrder(t *testing.T) { } } -func manyConcurrentQueries(t testOrBench) { +func manyConcurrentQueries(t testing.TB) { maxProcs, numReqs := 16, 500 if testing.Short() { maxProcs, numReqs = 4, 50 |
