Skip to content

Commit

Permalink
fixes for ARM32 (dotnet/corefx#34559)
Browse files Browse the repository at this point in the history
* arm fixes

* use PassingTestTimeoutMilliseconds instead of hardcoded number


Commit migrated from dotnet/corefx@4eccf3f
  • Loading branch information
wfurt authored and stephentoub committed Jan 18, 2019
1 parent 2047033 commit b1ca45d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,8 @@ private void SetMultithreading()

private void SetTimeouts()
{
// Set timeout limit on the connect phase.
SetCurlOption(CURLoption.CURLOPT_CONNECTTIMEOUT_MS, int.MaxValue);
// Set timeout limit on the connect phase. curl has bug on ARM so use max - 1s.
SetCurlOption(CURLoption.CURLOPT_CONNECTTIMEOUT_MS, int.MaxValue - 1000);

// Override the default DNS cache timeout. libcurl defaults to a 1 minute
// timeout, but we extend that to match the Windows timeout of 10 minutes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,21 @@ public NtAuthServer(AuthenticationSchemes authSchemes)
{
// Ignore.
}
catch (ObjectDisposedException)
{
// Ignore.
}
catch (InvalidOperationException)
{
// Ignore.
}
});
}

public void Dispose()
{
_listener.Stop();
_serverTask.Wait();
_serverTask.Wait(TestHelper.PassingTestTimeoutMilliseconds);
}

public string BaseUrl { get; private set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public static byte[] ComputeMD5Hash(byte[] data)

public static Task WhenAllCompletedOrAnyFailed(params Task[] tasks)
{
return TaskTimeoutExtensions.WhenAllOrAnyFailed(tasks);
return TaskTimeoutExtensions.WhenAllOrAnyFailed(tasks, PlatformDetection.IsArmProcess || PlatformDetection.IsArm64Process ? PassingTestTimeoutMilliseconds * 5 : PassingTestTimeoutMilliseconds);
}

public static Task WhenAllCompletedOrAnyFailedWithTimeout(int timeoutInMilliseconds, params Task[] tasks)
Expand Down

0 comments on commit b1ca45d

Please sign in to comment.