Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Commit b574561

Browse files
committed
Workaround two issues that show up with Core CLR on Linux
- `HttpClient` hits a `MissingMethodException` when URL hostname contains non-ASCII characters - culture-aware test lacked `[ReplaceCulture]`
1 parent c8d382e commit b574561

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

test/Microsoft.AspNet.Mvc.FunctionalTests/LinkGenerationTests.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,12 @@ public class LinkGenerationTests
2727
private readonly Action<IServiceCollection> _configureServices = new BasicWebSite.Startup().ConfigureServices;
2828

2929
[Theory]
30-
[InlineData("http://pingüino/Home/RedirectToActionReturningTaskAction", "/Home/ActionReturningTask")]
31-
[InlineData("http://pingüino/Home/RedirectToRouteActionAsMethodAction", "/Home/ActionReturningTask")]
32-
[InlineData("http://pingüino/Home/RedirectToRouteUsingRouteName", "/api/orders/10")]
30+
// Though host should not be important, pingüino did not work here with Core CLR on Linux. Seems to be a
31+
// current HttpClient, System.Uri or text normalization issue. Hits a MissingMethodException in
32+
// System.StringNormalizationExtensions.IsNormalized().
33+
[InlineData("http://localhost/Home/RedirectToActionReturningTaskAction", "/Home/ActionReturningTask")]
34+
[InlineData("http://localhost/Home/RedirectToRouteActionAsMethodAction", "/Home/ActionReturningTask")]
35+
[InlineData("http://localhost/Home/RedirectToRouteUsingRouteName", "/api/orders/10")]
3336
public async Task GeneratedLinksWithActionResults_AreRelativeLinks_WhenSetOnLocationHeader(
3437
string url,
3538
string expected)
@@ -39,8 +42,6 @@ public async Task GeneratedLinksWithActionResults_AreRelativeLinks_WhenSetOnLoca
3942
var client = server.CreateClient();
4043

4144
// Act
42-
43-
// The host is not important as everything runs in memory and tests are isolated from each other.
4445
var response = await client.GetAsync(url);
4546
var responseContent = await response.Content.ReadAsStringAsync();
4647

test/Microsoft.AspNet.Mvc.FunctionalTests/TagHelpersTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using System.Threading.Tasks;
1111
using BasicWebSite;
1212
using Microsoft.AspNet.Builder;
13+
using Microsoft.AspNet.Testing;
1314
using Microsoft.Framework.DependencyInjection;
1415
using Microsoft.Framework.WebEncoders;
1516
using Xunit;
@@ -194,6 +195,7 @@ public async Task ViewsWithModelMetadataAttributes_CanRenderForm()
194195
}
195196

196197
[Fact]
198+
[ReplaceCulture]
197199
public async Task ViewsWithModelMetadataAttributes_CanRenderPostedValue()
198200
{
199201
// Arrange

0 commit comments

Comments
 (0)