(t *testing.T)
| 801 | } |
| 802 | |
| 803 | func TestPoolQueryRow(t *testing.T) { |
| 804 | t.Parallel() |
| 805 | |
| 806 | ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second) |
| 807 | defer cancel() |
| 808 | |
| 809 | pool, err := pgxpool.New(ctx, os.Getenv("PGX_TEST_DATABASE")) |
| 810 | require.NoError(t, err) |
| 811 | defer pool.Close() |
| 812 | |
| 813 | testQueryRow(t, ctx, pool) |
| 814 | waitForReleaseToComplete() |
| 815 | |
| 816 | stats := pool.Stat() |
| 817 | assert.EqualValues(t, 0, stats.AcquiredConns()) |
| 818 | assert.EqualValues(t, 1, stats.TotalConns()) |
| 819 | } |
| 820 | |
| 821 | // https://github.com/jackc/pgx/issues/677 |
| 822 | func TestPoolQueryRowErrNoRows(t *testing.T) { |
nothing calls this directly
no test coverage detected