File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2836,8 +2836,8 @@ func TestContextCancelBegin(t *testing.T) {
2836
2836
t .Skip (`FIXME: it sometime fails with "expected driver.ErrBadConn, got sql: connection is already closed" on windows and macOS` )
2837
2837
}
2838
2838
2839
- runTests (t , dsn , func (dbt * DBTest ) {
2840
- dbt .mustExec ("CREATE TABLE test (v INTEGER)" )
2839
+ runTestsParallel (t , dsn , func (dbt * DBTest , tbl string ) {
2840
+ dbt .mustExec ("CREATE TABLE " + tbl + " (v INTEGER)" )
2841
2841
ctx , cancel := context .WithCancel (context .Background ())
2842
2842
conn , err := dbt .db .Conn (ctx )
2843
2843
if err != nil {
@@ -2854,7 +2854,7 @@ func TestContextCancelBegin(t *testing.T) {
2854
2854
2855
2855
// This query will be canceled.
2856
2856
startTime := time .Now ()
2857
- if _ , err := tx .ExecContext (ctx , "INSERT INTO test VALUES (SLEEP(1))" ); err != context .Canceled {
2857
+ if _ , err := tx .ExecContext (ctx , "INSERT INTO " + tbl + " VALUES (SLEEP(1))" ); err != context .Canceled {
2858
2858
dbt .Errorf ("expected context.Canceled, got %v" , err )
2859
2859
}
2860
2860
if d := time .Since (startTime ); d > 500 * time .Millisecond {
You can’t perform that action at this time.
0 commit comments