diff --git a/src/installer/tests/TestUtils/Command.cs b/src/installer/tests/TestUtils/Command.cs index 096a53dd8302e3..91f85be3584324 100644 --- a/src/installer/tests/TestUtils/Command.cs +++ b/src/installer/tests/TestUtils/Command.cs @@ -206,11 +206,9 @@ public Command Start() Process.Start(); break; } - catch (Win32Exception e) when (i < 3 && e.Message.Contains("Text file busy")) + catch (Win32Exception e) when (i < 4 && e.Message.Contains("Text file busy")) { - // 10 ms is short, but the race we're trying to avoid is in-between - // "fork" and "exec", so it should be fast - Thread.Sleep(10); + Thread.Sleep(i * 20); } }