Skip to content

Commit d9f4383

Browse files
authored
fix fragile test (#1522)
1 parent 98d7289 commit d9f4383

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

driver_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ func runTestsWithMultiStatement(t *testing.T, dsn string, tests ...func(dbt *DBT
128128
}
129129
defer db.Close()
130130
}
131+
// Previous test may be skipped without dropping the test table
132+
db.Exec("DROP TABLE IF EXISTS test")
131133

132134
dbt := &DBTest{t, db}
133135
for _, test := range tests {
@@ -147,6 +149,7 @@ func runTests(t *testing.T, dsn string, tests ...func(dbt *DBTest)) {
147149
}
148150
defer db.Close()
149151

152+
// Previous test may be skipped without dropping the test table
150153
db.Exec("DROP TABLE IF EXISTS test")
151154

152155
dsn2 := dsn + "&interpolateParams=true"

0 commit comments

Comments
 (0)