Skip to content

Commit d54acf7

Browse files
committed
fix fragile test
1 parent 278a0b9 commit d54acf7

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
@@ -117,6 +117,8 @@ func runTestsWithMultiStatement(t *testing.T, dsn string, tests ...func(dbt *DBT
117117
}
118118
defer db.Close()
119119
}
120+
// Previous test may be skipped without dropping the test table
121+
db.Exec("DROP TABLE IF EXISTS test")
120122

121123
dbt := &DBTest{t, db}
122124
for _, test := range tests {
@@ -136,6 +138,7 @@ func runTests(t *testing.T, dsn string, tests ...func(dbt *DBTest)) {
136138
}
137139
defer db.Close()
138140

141+
// Previous test may be skipped without dropping the test table
139142
db.Exec("DROP TABLE IF EXISTS test")
140143

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

0 commit comments

Comments
 (0)