Fix endpoint routing flaky test on build server in 2.2 (#7489)

This commit is contained in:
James Newton-King 2019-02-14 17:48:22 +13:00 committed by GitHub
parent 447306cbb9
commit 05895cde64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -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);