Skip to content

Commit

Permalink
Increase distributed transaction test timeout for MSDTC communication…
Browse files Browse the repository at this point in the history
… failures

Closes dotnet#76836
  • Loading branch information
roji committed Oct 11, 2022
1 parent 20d4e30 commit 1b33a60
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libraries/System.Transactions.Local/tests/OleTxTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,8 @@ private static void Test(Action action)

// In CI, we sometimes get XACT_E_TMNOTAVAILABLE; when it happens, it's typically on the very first
// attempt to connect to MSDTC (flaky/slow on-demand startup of MSDTC), though not only.
// This catches that error and retries.
int nRetries = 60;
// This catches that error and retries: 5 minutes of retries, with a second between them.
int nRetries = 60 * 5;

while (true)
{
Expand All @@ -596,7 +596,7 @@ private static void Test(Action action)
throw;
}

Thread.Sleep(500);
Thread.Sleep(1000);
}
}
}
Expand All @@ -605,7 +605,7 @@ private static void Test(Action action)
// so allow some time for assertions to succeed.
private static void Retry(Action action)
{
const int Retries = 50;
const int Retries = 100;

for (var i = 0; i < Retries; i++)
{
Expand Down

0 comments on commit 1b33a60

Please sign in to comment.