1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2026-01-06 08:01:21 +03:00

Try tweaking time sync settings to prevent clock drift rather than restarting VBoxService on every test run.

This commit is contained in:
David Steele
2018-04-18 18:47:43 -04:00
parent b3e668421b
commit ea4046a607
3 changed files with 9 additions and 13 deletions

View File

@@ -167,6 +167,10 @@
<release-item>
<p>Rename Perl tests so they don't conflict with their C counterparts.</p>
</release-item>
<release-item>
<p>Try tweaking time sync settings to prevent clock drift rather than restarting <id>VBoxService</id> on every test run.</p>
</release-item>
</release-development-list>
</release-test-list>
</release>

8
test/Vagrantfile vendored
View File

@@ -40,10 +40,12 @@ Vagrant.configure(2) do |config|
echo 'supersede domain-name-servers 8.8.8.8;' >> /etc/dhcp/dhclient.conf
/etc/init.d/networking restart
# If builds fail with 'modification time in the future', the following command will sync the vm clock with the host
# Set time sync settings so builds don't fail with clock drift errors
#---------------------------------------------------------------------------------------------------------------------------
echo 'Start Time Sync Service' && date
sudo /usr/sbin/VBoxService --timesync-set-start
echo 'Time Sync Settings' && date
/etc/init.d/virtualbox-guest-utils stop
/usr/sbin/VBoxService --timesync-set-on-restore 1 --timesync-interval 5000 --timesync-set-threshold 1
/etc/init.d/virtualbox-guest-utils start
#---------------------------------------------------------------------------------------------------------------------------
echo 'Install Perl Modules' && date

View File

@@ -396,16 +396,6 @@ eval
exit 0;
}
# Sync time to prevent build failures when running on VirtualBox.
&log(INFO, "sync vbox time");
my $strVBoxService = '/usr/sbin/VBoxService';
if ($oStorageTest->exists($strVBoxService))
{
executeTest("sudo killall VBoxService");
executeTest("sudo ${strVBoxService} --timesync-set-start");
}
# Build CI configuration
if (!$bNoCiConfig)
{