Skip to content

Commit

Permalink
Further increase wait times on timing tests for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jackc committed Nov 20, 2021
1 parent 885f39c commit 968a000
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pgxpool/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
// 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.
func waitForReleaseToComplete() {
time.Sleep(25 * time.Millisecond)
time.Sleep(500 * time.Millisecond)
}

type execer interface {
Expand Down
6 changes: 3 additions & 3 deletions pgxpool/pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ func TestPoolBackgroundChecksMaxConnLifetime(t *testing.T) {
c, err := db.Acquire(context.Background())
require.NoError(t, err)
c.Release()
time.Sleep(config.MaxConnLifetime + 100*time.Millisecond)
time.Sleep(config.MaxConnLifetime + 500*time.Millisecond)

stats := db.Stat()
assert.EqualValues(t, 0, stats.TotalConns())
Expand All @@ -389,7 +389,7 @@ func TestPoolBackgroundChecksMaxConnIdleTime(t *testing.T) {
c, err := db.Acquire(context.Background())
require.NoError(t, err)
c.Release()
time.Sleep(config.HealthCheckPeriod + 100*time.Millisecond)
time.Sleep(config.HealthCheckPeriod + 500*time.Millisecond)

stats := db.Stat()
assert.EqualValues(t, 0, stats.TotalConns())
Expand All @@ -406,7 +406,7 @@ func TestPoolBackgroundChecksMinConns(t *testing.T) {
require.NoError(t, err)
defer db.Close()

time.Sleep(config.HealthCheckPeriod + 100*time.Millisecond)
time.Sleep(config.HealthCheckPeriod + 500*time.Millisecond)

stats := db.Stat()
assert.EqualValues(t, 2, stats.TotalConns())
Expand Down

0 comments on commit 968a000

Please sign in to comment.