]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Raise some timeouts to 180s, in test code.
authorNoah Misch <noah@leadboat.com>
Tue, 11 Dec 2018 04:15:42 +0000 (20:15 -0800)
committerNoah Misch <noah@leadboat.com>
Tue, 11 Dec 2018 04:15:57 +0000 (20:15 -0800)
Slow runs of buildfarm members chipmunk, hornet and mandrill saw the
shorter timeouts expire.  The 180s timeout in poll_query_until has been
trouble-free since 2a0f89cd717ce6d49cdc47850577823682167e87 introduced
it two years ago, so use 180s more widely.  Back-patch to 9.6, where the
first of these timeouts was introduced.

Reviewed by Michael Paquier.

Discussion: https://postgr.es/m/20181209001601.GC2973271@rfd.leadboat.com

src/test/isolation/README
src/test/isolation/isolationtester.c
src/test/recovery/t/006_logical_decoding.pl
src/test/recovery/t/010_logical_decoding_timelines.pl

index bea278a856fffc911a7819fe8055f7e328fcac5f..780b6dca1b8eec4bf088d36a54c2129d5eae81f5 100644 (file)
@@ -108,8 +108,8 @@ Each step may contain commands that block until further action has been taken
 deadlock).  A test that uses this ability must manually specify valid
 permutations, i.e. those that would not expect a blocked session to execute a
 command.  If a test fails to follow that rule, isolationtester will cancel it
-after 60 seconds.  If the cancel doesn't work, isolationtester will exit
-uncleanly after a total of 75 seconds of wait time.  Testing invalid
+after 180 seconds.  If the cancel doesn't work, isolationtester will exit
+uncleanly after a total of 200 seconds of wait time.  Testing invalid
 permutations should be avoided because they can make the isolation tests take
 a very long time to run, and they serve no useful testing purpose.
 
index c32629b074059eb505fc57912a4509b3a715d61f..9a387e3eb2d0bcdb969d06584ff391d2a610460a 100644 (file)
@@ -765,15 +765,15 @@ try_complete_step(Step *step, int flags)
                        td += (int64) current_time.tv_usec - (int64) start_time.tv_usec;
 
                        /*
-                        * After 60 seconds, try to cancel the query.
+                        * After 180 seconds, try to cancel the query.
                         *
                         * If the user tries to test an invalid permutation, we don't want
                         * to hang forever, especially when this is running in the
-                        * buildfarm.  So try to cancel it after a minute.  This will
-                        * presumably lead to this permutation failing, but remaining
-                        * permutations and tests should still be OK.
+                        * buildfarm.  This will presumably lead to this permutation
+                        * failing, but remaining permutations and tests should still be
+                        * OK.
                         */
-                       if (td > 60 * USECS_PER_SEC && !canceled)
+                       if (td > 180 * USECS_PER_SEC && !canceled)
                        {
                                PGcancel   *cancel = PQgetCancel(conn);
 
@@ -790,15 +790,15 @@ try_complete_step(Step *step, int flags)
                        }
 
                        /*
-                        * After 75 seconds, just give up and die.
+                        * After 200 seconds, just give up and die.
                         *
                         * Since cleanup steps won't be run in this case, this may cause
                         * later tests to fail.  That stinks, but it's better than waiting
                         * forever for the server to respond to the cancel.
                         */
-                       if (td > 75 * USECS_PER_SEC)
+                       if (td > 200 * USECS_PER_SEC)
                        {
-                               fprintf(stderr, "step %s timed out after 75 seconds\n",
+                               fprintf(stderr, "step %s timed out after 200 seconds\n",
                                                step->name);
                                exit_nicely();
                        }
index 6f70353a36b4a96adc02e82f52541f9316102900..3f7f135291ded32ce2267c8ffed6c5f1ce655388 100644 (file)
@@ -71,7 +71,7 @@ my $endpos = $node_master->safe_psql('postgres',
 print "waiting to replay $endpos\n";
 
 my $stdout_recv = $node_master->pg_recvlogical_upto(
-       'postgres', 'test_slot', $endpos, 10,
+       'postgres', 'test_slot', $endpos, 180,
        'include-xids'     => '0',
        'skip-empty-xacts' => '1');
 chomp($stdout_recv);
@@ -84,7 +84,7 @@ $node_master->poll_query_until('postgres',
   or die "slot never became inactive";
 
 $stdout_recv = $node_master->pg_recvlogical_upto(
-       'postgres', 'test_slot', $endpos, 10,
+       'postgres', 'test_slot', $endpos, 180,
        'include-xids'     => '0',
        'skip-empty-xacts' => '1');
 chomp($stdout_recv);
index 5620450acfeb1dd8a4c356e19f1f8908acd07029..1f3d4f72f74f245ef46b5b377c6e8e02b397a200 100644 (file)
@@ -182,7 +182,7 @@ my $endpos = $node_replica->safe_psql('postgres',
 
 $stdout = $node_replica->pg_recvlogical_upto(
        'postgres', 'before_basebackup',
-       $endpos,    30,
+       $endpos,    180,
        'include-xids'     => '0',
        'skip-empty-xacts' => '1');