You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-15 01:04:37 +02:00
Fix race condition in real/all integration tests.
If the tests are running quickly then the time target might end up the same as the end time of the prior full backup. That means restore auto-select will not pick it as a candidate and restore the last backup instead causing the restore compare to fail. So, sleep one second.
This commit is contained in:
@ -549,6 +549,11 @@ sub run
|
||||
|
||||
# Setup the time targets
|
||||
#---------------------------------------------------------------------------------------------------------------------------
|
||||
# If the tests are running quickly then the time target might end up the same as the end time of the prior full backup. That
|
||||
# means restore auto-select will not pick it as a candidate and restore the last backup instead causing the restore compare
|
||||
# to fail. So, sleep one second.
|
||||
sleep(1);
|
||||
|
||||
$oHostDbMaster->sqlExecute("update test set message = '$strTimeMessage'");
|
||||
$oHostDbMaster->sqlWalRotate();
|
||||
my $strTimeTarget = $oHostDbMaster->sqlSelectOne("select current_timestamp");
|
||||
|
Reference in New Issue
Block a user