https://github.com/jackc/pgx/issues/1801#issuecomment-2203784178
(t *testing.T)
| 296 | |
| 297 | // https://github.com/jackc/pgx/issues/1801#issuecomment-2203784178 |
| 298 | func TestConnSendBatchReadResultsWhenNothingQueued(t *testing.T) { |
| 299 | t.Parallel() |
| 300 | |
| 301 | ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second) |
| 302 | defer cancel() |
| 303 | |
| 304 | pgxtest.RunWithQueryExecModes(ctx, t, defaultConnTestRunner, nil, func(ctx context.Context, t testing.TB, conn *pgx.Conn) { |
| 305 | batch := &pgx.Batch{} |
| 306 | br := conn.SendBatch(ctx, batch) |
| 307 | commandTag, err := br.Exec() |
| 308 | require.Equal(t, "", commandTag.String()) |
| 309 | require.EqualError(t, err, "no more results in batch") |
| 310 | err = br.Close() |
| 311 | require.NoError(t, err) |
| 312 | }) |
| 313 | } |
| 314 | |
| 315 | func TestConnSendBatchReadMoreResultsThanQueriesSent(t *testing.T) { |
| 316 | t.Parallel() |
nothing calls this directly
no test coverage detected