mirror of https://github.com/jackc/pgx.git
Further increase wait times on timing tests for CI
parent
885f39c368
commit
968a00094e
|
@ -17,7 +17,7 @@ import (
|
||||||
// completed. To test something that relies on the actual work for Conn.Release being completed we must simply wait.
|
// completed. To test something that relies on the actual work for Conn.Release being completed we must simply wait.
|
||||||
// This function wraps the sleep so there is more meaning for the callers.
|
// This function wraps the sleep so there is more meaning for the callers.
|
||||||
func waitForReleaseToComplete() {
|
func waitForReleaseToComplete() {
|
||||||
time.Sleep(25 * time.Millisecond)
|
time.Sleep(500 * time.Millisecond)
|
||||||
}
|
}
|
||||||
|
|
||||||
type execer interface {
|
type execer interface {
|
||||||
|
|
|
@ -366,7 +366,7 @@ func TestPoolBackgroundChecksMaxConnLifetime(t *testing.T) {
|
||||||
c, err := db.Acquire(context.Background())
|
c, err := db.Acquire(context.Background())
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
c.Release()
|
c.Release()
|
||||||
time.Sleep(config.MaxConnLifetime + 100*time.Millisecond)
|
time.Sleep(config.MaxConnLifetime + 500*time.Millisecond)
|
||||||
|
|
||||||
stats := db.Stat()
|
stats := db.Stat()
|
||||||
assert.EqualValues(t, 0, stats.TotalConns())
|
assert.EqualValues(t, 0, stats.TotalConns())
|
||||||
|
@ -389,7 +389,7 @@ func TestPoolBackgroundChecksMaxConnIdleTime(t *testing.T) {
|
||||||
c, err := db.Acquire(context.Background())
|
c, err := db.Acquire(context.Background())
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
c.Release()
|
c.Release()
|
||||||
time.Sleep(config.HealthCheckPeriod + 100*time.Millisecond)
|
time.Sleep(config.HealthCheckPeriod + 500*time.Millisecond)
|
||||||
|
|
||||||
stats := db.Stat()
|
stats := db.Stat()
|
||||||
assert.EqualValues(t, 0, stats.TotalConns())
|
assert.EqualValues(t, 0, stats.TotalConns())
|
||||||
|
@ -406,7 +406,7 @@ func TestPoolBackgroundChecksMinConns(t *testing.T) {
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
defer db.Close()
|
defer db.Close()
|
||||||
|
|
||||||
time.Sleep(config.HealthCheckPeriod + 100*time.Millisecond)
|
time.Sleep(config.HealthCheckPeriod + 500*time.Millisecond)
|
||||||
|
|
||||||
stats := db.Stat()
|
stats := db.Stat()
|
||||||
assert.EqualValues(t, 2, stats.TotalConns())
|
assert.EqualValues(t, 2, stats.TotalConns())
|
||||||
|
|
Loading…
Reference in New Issue