Skip to content

Commit a560843

Browse files
committed
fix fragile test
1 parent da50f26 commit a560843

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎driver_test.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,14 @@ func runTests(t *testing.T, dsn string, tests ...func(dbt *DBTest)){
165165
for_, test:=rangetests{
166166
t.Run("default", func(t*testing.T){
167167
dbt:=&DBTest{t, db}
168+
deferdbt.db.Exec("DROP TABLE IF EXISTS test")
168169
test(dbt)
169-
dbt.db.Exec("DROP TABLE IF EXISTS test")
170170
})
171171
ifdb2!=nil{
172172
t.Run("interpolateParams", func(t*testing.T){
173173
dbt2:=&DBTest{t, db2}
174+
deferdbt2.db.Exec("DROP TABLE IF EXISTS test")
174175
test(dbt2)
175-
dbt2.db.Exec("DROP TABLE IF EXISTS test")
176176
})
177177
}
178178
}

0 commit comments

Comments
(0)