From d54acf7f842984902e50d2033fe9d6811635f0d7 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Mon, 11 Dec 2023 23:26:29 +0900 Subject: [PATCH] fix fragile test --- driver_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/driver_test.go b/driver_test.go index f46d38df6..c83378765 100644 --- a/driver_test.go +++ b/driver_test.go @@ -117,6 +117,8 @@ func runTestsWithMultiStatement(t *testing.T, dsn string, tests ...func(dbt *DBT } defer db.Close() } + // Previous test may be skipped without dropping the test table + db.Exec("DROP TABLE IF EXISTS test") dbt := &DBTest{t, db} for _, test := range tests { @@ -136,6 +138,7 @@ func runTests(t *testing.T, dsn string, tests ...func(dbt *DBTest)) { } defer db.Close() + // Previous test may be skipped without dropping the test table db.Exec("DROP TABLE IF EXISTS test") dsn2 := dsn + "&interpolateParams=true"