Skip to content

Commit 5e83d87

Browse files
Don't enforce global timeout when debugging (Azure#25524)
1 parent e38b7d0 commit 5e83d87

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sdk/core/Azure.Core.TestFramework/src/ClientTestBase.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
using System;
55
using System.Collections.Generic;
6+
using System.Diagnostics;
67
using System.Reflection;
78
using Castle.DynamicProxy;
89
using NUnit.Framework;
@@ -35,7 +36,7 @@ public virtual void GlobalTimeoutTearDown()
3536
{
3637
var executionContext = TestExecutionContext.CurrentContext;
3738
var duration = DateTime.UtcNow - executionContext.StartTime;
38-
if (duration > TimeSpan.FromSeconds(GLOBAL_TEST_TIMEOUT_IN_SECONDS))
39+
if (duration > TimeSpan.FromSeconds(GLOBAL_TEST_TIMEOUT_IN_SECONDS) && !Debugger.IsAttached)
3940
{
4041
executionContext.CurrentResult.SetResult(ResultState.Failure, $"Test exceeded global time limit of {GLOBAL_TEST_TIMEOUT_IN_SECONDS} seconds. Duration: {duration}");
4142
}

0 commit comments

Comments
 (0)