From 7b02cb123209c832e405b65880efcd548be9add6 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Mon, 22 Jun 2026 19:38:22 +0200 Subject: [PATCH] Added delay to flaky test that is caused by timestamp resolution being 1s --- Duplicati/UnitTest/Issue1570.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Duplicati/UnitTest/Issue1570.cs b/Duplicati/UnitTest/Issue1570.cs index 6bdc990e4..58ae07a7b 100644 --- a/Duplicati/UnitTest/Issue1570.cs +++ b/Duplicati/UnitTest/Issue1570.cs @@ -120,6 +120,13 @@ namespace Duplicati.UnitTest Assert.That(failed, Is.True, "Failed to trigger the dlist upload failure"); + // Wait a moment to ensure the resumed backup's operation timestamp is + // strictly after the synthetic filelist timestamp created from the + // interrupted backup. Fileset filenames have one-second resolution, so + // a sub-second gap between backups can otherwise place the synthetic + // fileset timestamp ahead of the current operation timestamp. + await Task.Delay(TimeSpan.FromSeconds(1)); + // Verify that dblock files were uploaded but no dlist exists var dblockFilesAfterFail = Directory.EnumerateFiles(this.TARGETFOLDER, "*.dblock.*").ToList(); Assert.That(dblockFilesAfterFail.Count, Is.GreaterThan(0), "At least one dblock file should have been uploaded");