Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Fix SqlClient diagnostic test failures #16349

Merged
merged 3 commits into from
Feb 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/Common/tests/System/Diagnostics/RemoteExecutorTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ public abstract class RemoteExecutorTestBase : FileCleanupTestBase
protected static string HostRunner => Process.GetCurrentProcess().MainModule.FileName;

/// <summary>A timeout (milliseconds) after which a wait on a remote operation should be considered a failure.</summary>
public const int FailWaitTimeoutMilliseconds = 30 * 1000;
public const int FailWaitTimeoutMilliseconds = 60 * 1000;
/// <summary>The exit code returned when the test process exits successfully.</summary>
internal const int SuccessExitCode = 42;

/// <summary>Determines if we're running on the .NET Framework (rather than .NET Core).</summary>
internal static bool IsFullFramework => RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.OrdinalIgnoreCase);

/// <summary>Invokes the method from this assembly in another process using the specified arguments.</summary>
Expand Down Expand Up @@ -172,10 +173,14 @@ public void Dispose()
// needing to do this in every derived test and keep each test much simpler.
try
{
Assert.True(Process.WaitForExit(Options.TimeOut));
Assert.True(Process.WaitForExit(Options.TimeOut),
$"Timed out after {Options.TimeOut}ms waiting for remote process {Process.Id}");

if (Options.CheckExitCode)
{
Assert.Equal(SuccessExitCode, Process.ExitCode);
}
}
finally
{
// Cleanup
Expand Down
Loading