Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/duplicati/duplicati.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Hsu <kennethhsu@gmail.com>2020-09-27 20:44:25 +0300
committerKenneth Hsu <kennethhsu@gmail.com>2020-09-27 20:44:25 +0300
commita8b0df57d43cbb6ecdd312955ec50417946fbc6b (patch)
treee2265ffecb508ffd236391c05ecbb91042ee10cf /Duplicati/UnitTest
parent9b977b7ba04a940868754fd15a37b99fbd77f1bd (diff)
Avoid clock issues when quickly running successive backups in tests.
This is an attempt to avoid errors like "System.Exception : The previous backup has time 9/27/2020 5:25:56 PM, but this backup has time 9/27/2020 5:25:55 PM. Something is wrong with the clock." We are seeing these errors often recently in AppVeyor.
Diffstat (limited to 'Duplicati/UnitTest')
-rw-r--r--Duplicati/UnitTest/ProblematicPathTests.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Duplicati/UnitTest/ProblematicPathTests.cs b/Duplicati/UnitTest/ProblematicPathTests.cs
index eb2e815d6..e470f67c3 100644
--- a/Duplicati/UnitTest/ProblematicPathTests.cs
+++ b/Duplicati/UnitTest/ProblematicPathTests.cs
@@ -140,6 +140,9 @@ namespace Duplicati.UnitTest
Assert.AreEqual(directories.Count, backupResults.ExaminedFiles);
}
+ // Block for a small amount of time to avoid clock issues when quickly running successive backups.
+ System.Threading.Thread.Sleep(1000);
+
// Backup with verbatim asterisk in include filter should include
// one directory in Linux and zero directories in Windows.
filter = new FilterExpression("@" + SystemIO.IO_OS.PathCombine(dirWithAsterisk, file));