Skip to content

Commit 29eba8c

Browse files
committed
Removing default timeout from .net 6 and up. No longer sent to the framework.
1 parent a849e96 commit 29eba8c

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/NUnitTestAdapter/NUnitTestAdapter.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,11 @@ protected TestPackage CreateTestPackage(string assemblyName, IGrouping<string, T
227227
package.Settings[PackageSettings.SynchronousEvents] = Settings.SynchronousEvents;
228228
package.Settings[PackageSettings.UseDefaultAssemblyLoadContext] = Settings.UseDefaultAssemblyLoadContext;
229229

230+
#if NET462
230231
int timeout = Settings.DefaultTimeout;
231232
if (timeout > 0)
232233
package.Settings[PackageSettings.DefaultTimeout] = timeout;
234+
#endif
233235

234236
package.Settings[PackageSettings.InternalTraceLevel] = Settings.InternalTraceLevelEnum.ToString();
235237
package.Settings[PackageSettings.DebugAgent] = Settings.DebugEngine;
@@ -332,5 +334,5 @@ protected void Unload()
332334
NUnitEngineAdapter = null;
333335
}
334336

335-
#endregion
337+
#endregion
336338
}

src/NUnitTestAdapter/PackageSettings.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,18 @@ public static class PackageSettings
158158

159159
#endregion
160160

161-
#region Framework Settings - Passed through and used by the 3.0 Framework
161+
#region Framework Settings - Passed through and used by the 3.0 Framework
162162

163+
#if NET462
163164
/// <summary>
164165
/// Integer value in milliseconds for the default timeout value
165166
/// for test cases. If not specified, there is no timeout except
166167
/// as specified by attributes on the tests themselves.
167168
/// </summary>
168169
public const string DefaultTimeout = "DefaultTimeout";
169170

171+
#endif
172+
170173
/// <summary>
171174
/// A TextWriter to which the internal trace will be sent.
172175
/// </summary>
@@ -224,7 +227,7 @@ public static class PackageSettings
224227
/// </summary>
225228
public const string TestParametersDictionary = "TestParametersDictionary";
226229

227-
#endregion
230+
#endregion
228231

229232
#region Internal Settings - Used only within the engine
230233

0 commit comments

Comments
 (0)