From 05895cde64ad37f1f778a5d9867c6d7e64f8b869 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Thu, 14 Feb 2019 17:48:22 +1300 Subject: [PATCH] Fix endpoint routing flaky test on build server in 2.2 (#7489) --- .../test/UnitTests/Matching/DfaMatcherBuilderTest.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Http/Routing/test/UnitTests/Matching/DfaMatcherBuilderTest.cs b/src/Http/Routing/test/UnitTests/Matching/DfaMatcherBuilderTest.cs index 2eff433602..507f85de44 100644 --- a/src/Http/Routing/test/UnitTests/Matching/DfaMatcherBuilderTest.cs +++ b/src/Http/Routing/test/UnitTests/Matching/DfaMatcherBuilderTest.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -231,7 +231,9 @@ namespace Microsoft.AspNetCore.Routing.Matching Assert.Null(root.Parameters); var next = Assert.Single(root.Literals); - Assert.Equal("a", next.Key); + // Ignore case in 2.2 because EndpointComparer.ComparePattern does not specify a culture and running in the wrong culture + // will change the order of results. This causes 'A' to be used instead of 'a' + Assert.Equal("a", next.Key, ignoreCase: true); var a = next.Value; Assert.Null(a.Matches);