From c6c8bb8b73ff4f7a686ca5a350fbb0093b3b708b Mon Sep 17 00:00:00 2001 From: Shay Rojansky Date: Wed, 12 Oct 2022 03:08:53 +0200 Subject: [PATCH] Increase distributed transaction test timeout for MSDTC communication failures (#76892) Closes #76836 --- .../System.Transactions.Local/tests/OleTxTests.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libraries/System.Transactions.Local/tests/OleTxTests.cs b/src/libraries/System.Transactions.Local/tests/OleTxTests.cs index 0d52469c696d86..b60cd8d9b66595 100644 --- a/src/libraries/System.Transactions.Local/tests/OleTxTests.cs +++ b/src/libraries/System.Transactions.Local/tests/OleTxTests.cs @@ -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) { @@ -596,7 +596,7 @@ private static void Test(Action action) throw; } - Thread.Sleep(500); + Thread.Sleep(1000); } } } @@ -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++) {