From 29d2ea6d4db6e22934105e37e7c7d066312ad13a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Mar 2026 00:24:13 +0000 Subject: [PATCH 1/4] Initial plan From 3e0e74c0bcab1c66a0bb2b3805e2b8649a92570f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Mar 2026 00:36:19 +0000 Subject: [PATCH 2/4] Fix OleTxTests.Recovery timeout by bounding remote process and test wall-clock time Co-authored-by: danmoseley <6385855+danmoseley@users.noreply.github.com> --- src/libraries/System.Transactions.Local/tests/OleTxTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/System.Transactions.Local/tests/OleTxTests.cs b/src/libraries/System.Transactions.Local/tests/OleTxTests.cs index 2b02792026a421..2cec0fe4e35954 100644 --- a/src/libraries/System.Transactions.Local/tests/OleTxTests.cs +++ b/src/libraries/System.Transactions.Local/tests/OleTxTests.cs @@ -301,7 +301,7 @@ public void SinglePhaseCommit(SinglePhaseEnlistment singlePhaseEnlistment) } } - [ConditionalFact(typeof(OleTxTests), nameof(IsRemoteExecutorSupportedAndNotNano))] + [ConditionalFact(typeof(OleTxTests), nameof(IsRemoteExecutorSupportedAndNotNano), Timeout = 180_000)] public void Recovery() { Test(() => @@ -335,7 +335,7 @@ public void Recovery() using (RemoteExecutor.Invoke( EnlistAndCrash, propagationTokenText, guid2.ToString(), secondEnlistmentRecoveryFilePath, - new RemoteInvokeOptions { ExpectedExitCode = 42 })) + new RemoteInvokeOptions { ExpectedExitCode = 42, TimeOut = 120_000 })) { // Wait for the external process to enlist in the transaction, it will signal this EventWaitHandle. Assert.True(waitHandle.WaitOne(Timeout)); From fc535389af824c6164b5a6e11a21a98999a1fd5f Mon Sep 17 00:00:00 2001 From: Dan Moseley Date: Thu, 19 Mar 2026 20:13:38 -0600 Subject: [PATCH 3/4] Remove broken Timeout on ConditionalFact (xunit v2 only supports Timeout on async methods) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/libraries/System.Transactions.Local/tests/OleTxTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Transactions.Local/tests/OleTxTests.cs b/src/libraries/System.Transactions.Local/tests/OleTxTests.cs index 2cec0fe4e35954..ff5b9be9ae974b 100644 --- a/src/libraries/System.Transactions.Local/tests/OleTxTests.cs +++ b/src/libraries/System.Transactions.Local/tests/OleTxTests.cs @@ -301,7 +301,7 @@ public void SinglePhaseCommit(SinglePhaseEnlistment singlePhaseEnlistment) } } - [ConditionalFact(typeof(OleTxTests), nameof(IsRemoteExecutorSupportedAndNotNano), Timeout = 180_000)] + [ConditionalFact(typeof(OleTxTests), nameof(IsRemoteExecutorSupportedAndNotNano))] public void Recovery() { Test(() => From 195ffdcdcb7697126dae6b2e4238877b08802f65 Mon Sep 17 00:00:00 2001 From: Dan Moseley Date: Thu, 19 Mar 2026 20:18:52 -0600 Subject: [PATCH 4/4] Add comment explaining the TimeOut on RemoteInvokeOptions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/libraries/System.Transactions.Local/tests/OleTxTests.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libraries/System.Transactions.Local/tests/OleTxTests.cs b/src/libraries/System.Transactions.Local/tests/OleTxTests.cs index ff5b9be9ae974b..d071f03b51c896 100644 --- a/src/libraries/System.Transactions.Local/tests/OleTxTests.cs +++ b/src/libraries/System.Transactions.Local/tests/OleTxTests.cs @@ -335,6 +335,8 @@ public void Recovery() using (RemoteExecutor.Invoke( EnlistAndCrash, propagationTokenText, guid2.ToString(), secondEnlistmentRecoveryFilePath, + // Bound the child process lifetime so that if MSDTC is unresponsive + // and the process hangs, Dispose() will kill it instead of blocking indefinitely. new RemoteInvokeOptions { ExpectedExitCode = 42, TimeOut = 120_000 })) { // Wait for the external process to enlist in the transaction, it will signal this EventWaitHandle.