From d9f43839450e9361c16685ea24f0bce0da1935b7 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Tue, 12 Dec 2023 14:21:53 +0900 Subject: [PATCH] fix fragile test (#1522) --- driver_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/driver_test.go b/driver_test.go index efbff1792..87892a09a 100644 --- a/driver_test.go +++ b/driver_test.go @@ -128,6 +128,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 { @@ -147,6 +149,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"