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.
This commit is contained in:
Kenneth Hsu
2020-09-27 10:44:25 -07:00
parent 9b977b7ba0
commit a8b0df57d4
@@ -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));