Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Up retry for ETXTBSY
Still seeing occasional failure in Alpine
(https://dev.azure.com/dnceng/public/_build/results?buildId=1434759) so
raising the retry time.
  • Loading branch information
agocke committed Oct 21, 2021
commit a4a6581e94eb673780b514959d3d993076af9d30
4 changes: 1 addition & 3 deletions src/installer/tests/TestUtils/Command.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,7 @@ public Command Start()
}
catch (Win32Exception e) when (i < 3 && 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(50);
Copy link
Member

@VSadov VSadov Oct 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now if we wait, we would wait at least 50ms. I think something like Sleep(i * 20) and limiting i < 4 could have better balance between common quick case and if needed a longer wait.

The nice part is that the fist iteration would be Sleep(0), which works like a machine-wide Yield, but without minimum wait.

}
}

Expand Down