]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Improve portability of new worker_spi test
authorMichael Paquier <michael@paquier.xyz>
Tue, 6 Jan 2026 11:24:17 +0000 (20:24 +0900)
committerMichael Paquier <michael@paquier.xyz>
Tue, 6 Jan 2026 11:24:17 +0000 (20:24 +0900)
The new test 002_worker_terminate relies on the generation of a LOG
entry to check that a worker has been started, but missed the fact that
a node set with log_error_verbosity = verbose would add an error code.
The regexp used for the matching check did not take this case into
account, making the test fail on a timeout.  The regexp is now fixed to
handle the verbose case correctly.

Per buildfarm member prion, that uses log_error_verbosity = verbose.
The error was reproducible by setting this GUC the same way in the test.

Oversight in f1e251be80a0.

src/test/modules/worker_spi/t/002_worker_terminate.pl

index cf262bcc2c520c3c7db105a0ad7efd8791c0eb07..6d379435598193f6f83ab401466411bad6e69576 100644 (file)
@@ -30,7 +30,7 @@ sub launch_bgworker
 
        # Check that the bgworker is initialized.
        $node->wait_for_log(
-               qr/LOG:  worker_spi dynamic worker $testcase initialized with .*\..*/,
+               qr/LOG: .*worker_spi dynamic worker $testcase initialized with .*\..*/,
                $offset);
        my $result = $node->safe_psql($database,
                "SELECT count(*) > 0 FROM pg_stat_activity WHERE pid = $pid;");