2
0

Drastically increase allowed test times for potato CI

The context timeouts for tests are designed to give a better error
message when something hangs rather than the test just timing out.
Unfortunately, the potato CI frequently has some test or another
randomly take a long time. While the increased times are somewhat less
than optimal on a real computer, hopefully this will solve the
flickering CI.
This commit is contained in:
Jack Christensen
2023-07-11 21:16:08 -05:00
parent e0c70201dc
commit 05440f9d3f
19 changed files with 240 additions and 240 deletions
+2 -2
View File
@@ -161,7 +161,7 @@ func TestTxCommitSerializationFailure(t *testing.T) {
c2 := mustConnectString(t, os.Getenv("PGX_TEST_DATABASE"))
defer closeConn(t, c2)
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
c1.Exec(ctx, `drop table if exists tx_serializable_sums`)
@@ -375,7 +375,7 @@ func TestBeginReadOnly(t *testing.T) {
func TestBeginTxBeginQuery(t *testing.T) {
t.Parallel()
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second)
defer cancel()
pgxtest.RunWithQueryExecModes(ctx, t, defaultConnTestRunner, nil, func(ctx context.Context, t testing.TB, conn *pgx.Conn) {