(t *testing.T)
| 360 | } |
| 361 | |
| 362 | func TestExecContextFailureWithoutCancelationWithArguments(t *testing.T) { |
| 363 | t.Parallel() |
| 364 | |
| 365 | ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second) |
| 366 | defer cancel() |
| 367 | |
| 368 | pgxtest.RunWithQueryExecModes(ctx, t, defaultConnTestRunner, nil, func(ctx context.Context, t testing.TB, conn *pgx.Conn) { |
| 369 | ctx, cancelFunc := context.WithCancel(ctx) |
| 370 | defer cancelFunc() |
| 371 | |
| 372 | _, err := conn.Exec(ctx, "selct $1;", 1) |
| 373 | if err == nil { |
| 374 | t.Fatal("Expected SQL syntax error") |
| 375 | } |
| 376 | assert.False(t, pgconn.SafeToRetry(err)) |
| 377 | }) |
| 378 | } |
| 379 | |
| 380 | func TestExecFailureCloseBefore(t *testing.T) { |
| 381 | t.Parallel() |
nothing calls this directly
no test coverage detected