Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc99c67f

Browse files
committed
Replace PGISOLATIONTIMEOUT with 2 * PG_TEST_TIMEOUT_DEFAULT.
Now that the more-generic variable exists, use it.Discussion:https://postgr.es/m/20220219024136.GA3670392@rfd.leadboat.com
1 parent4f4c72c commitc99c67f

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

‎src/test/isolation/README

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ pg_isolation_regress is a tool similar to pg_regress, but instead of using
4747
psql to execute a test, it uses isolationtester. It accepts all the same
4848
command-line arguments as pg_regress.
4949

50-
By default, isolationtester will wait at most300 seconds (5 minutes)
50+
By default, isolationtester will wait at most360 seconds (6 minutes)
5151
for any one test step to complete. If you need to adjust this, set
52-
the environment variablePGISOLATIONTIMEOUT to the desired timeout
53-
in seconds.
52+
the environment variablePG_TEST_TIMEOUT_DEFAULT tohalfthe desired
53+
timeoutin seconds.
5454

5555

5656
Test specification
@@ -138,10 +138,11 @@ Each step may contain commands that block until further action has been taken
138138
deadlock). A test that uses this ability must manually specify valid
139139
permutations, i.e. those that would not expect a blocked session to execute a
140140
command. If a test fails to follow that rule, isolationtester will cancel it
141-
after PGISOLATIONTIMEOUT seconds. If the cancel doesn't work, isolationtester
142-
will exit uncleanly after a total of twice PGISOLATIONTIMEOUT. Testing
143-
invalid permutations should be avoided because they can make the isolation
144-
tests take a very long time to run, and they serve no useful testing purpose.
141+
after 2 * PG_TEST_TIMEOUT_DEFAULT seconds. If the cancel doesn't work,
142+
isolationtester will exit uncleanly after a total of 4 *
143+
PG_TEST_TIMEOUT_DEFAULT. Testing invalid permutations should be avoided
144+
because they can make the isolation tests take a very long time to run, and
145+
they serve no useful testing purpose.
145146

146147
Note that isolationtester recognizes that a command has blocked by looking
147148
to see if it is shown as waiting in the pg_locks view; therefore, only

‎src/test/isolation/isolationtester.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static intnconns = 0;
4646
staticboolany_new_notice= false;
4747

4848
/* Maximum time to wait before giving up on a step (in usec) */
49-
staticint64max_step_wait=300*USECS_PER_SEC;
49+
staticint64max_step_wait=360*USECS_PER_SEC;
5050

5151

5252
staticvoidcheck_testspec(TestSpec*testspec);
@@ -128,12 +128,12 @@ main(int argc, char **argv)
128128
conninfo="dbname = postgres";
129129

130130
/*
131-
* IfPGISOLATIONTIMEOUT is set in the environment, adopt its value (given
132-
*in seconds) as the max time to wait for any one step to complete.
131+
* IfPG_TEST_TIMEOUT_DEFAULT is set, adopt its value (given in seconds)
132+
*as half the max time to wait for any one step to complete.
133133
*/
134-
env_wait=getenv("PGISOLATIONTIMEOUT");
134+
env_wait=getenv("PG_TEST_TIMEOUT_DEFAULT");
135135
if (env_wait!=NULL)
136-
max_step_wait= ((int64)atoi(env_wait))*USECS_PER_SEC;
136+
max_step_wait=2*((int64)atoi(env_wait))*USECS_PER_SEC;
137137

138138
/* Read the test spec from stdin */
139139
spec_yyparse();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp