From 08f8504f2cbb472aa0cb166ff394f9b9d093603c Mon Sep 17 00:00:00 2001 From: Carl Johnsen Date: Fri, 27 Feb 2026 09:28:13 +0100 Subject: [PATCH] Reduced Windows timeout times --- Duplicati/UnitTest/DiskImage/WindowsDiskImageHelper.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Duplicati/UnitTest/DiskImage/WindowsDiskImageHelper.cs b/Duplicati/UnitTest/DiskImage/WindowsDiskImageHelper.cs index 5dead28e7..9a7cbdaf0 100644 --- a/Duplicati/UnitTest/DiskImage/WindowsDiskImageHelper.cs +++ b/Duplicati/UnitTest/DiskImage/WindowsDiskImageHelper.cs @@ -184,7 +184,7 @@ namespace Duplicati.UnitTest.DiskImage _process.StandardInput.WriteLine(command); // Wait for output with a timeout - var timeout = TimeSpan.FromSeconds(60); + var timeout = TimeSpan.FromSeconds(30); if (!_outputAvailable.Wait(timeout)) { throw new TimeoutException($"PowerShell command timed out after {timeout.TotalSeconds} seconds.\nScript:\n{script}"); @@ -429,7 +429,7 @@ namespace Duplicati.UnitTest.DiskImage RunPowerShell(script); // Wait for the disk to be attached and get the disk number - int diskNumber = WaitForDiskAttachment(imagePath, TimeSpan.FromSeconds(30)); + int diskNumber = WaitForDiskAttachment(imagePath, TimeSpan.FromSeconds(5)); if (diskNumber < 0) throw new InvalidOperationException($"Failed to get disk number for VHD: {imagePath}"); @@ -474,7 +474,7 @@ namespace Duplicati.UnitTest.DiskImage RunPowerShell(script); // Wait for the initialization to complete - WaitForDiskInitialization(diskNumber, TimeSpan.FromSeconds(30)); + WaitForDiskInitialization(diskNumber, TimeSpan.FromSeconds(5)); if (partitions.Length == 0) return []; @@ -871,7 +871,7 @@ namespace Duplicati.UnitTest.DiskImage RunPowerShell(script); // Wait for the disk to be attached and get the new disk number - int newDiskNumber = WaitForDiskAttachment(imagePath, TimeSpan.FromSeconds(30)); + int newDiskNumber = WaitForDiskAttachment(imagePath, TimeSpan.FromSeconds(5)); if (newDiskNumber < 0) throw new InvalidOperationException($"Failed to re-attach VHD: {imagePath}");