Skip to content

Commit 1123371

Browse files
committed
Try not use 'USA' abbreviation in test dataset to avoid ordering issues
1 parent 5579886 commit 1123371

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Orm/Xtensive.Orm.Tests/Linq/OrderByTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public void OrderByAnonymous2Test()
9999
[Test]
100100
public void OrderByDescendingTest()
101101
{
102-
Require.ProviderIsNot(StorageProvider.Sqlite | StorageProvider.Firebird | StorageProvider.MySql, "Different ordering");
102+
//Require.ProviderIsNot(StorageProvider.Sqlite | StorageProvider.Firebird | StorageProvider.MySql, "Different ordering");
103103

104104
var serverOrdered = Session.Query.All<Customer>()
105105
.OrderByDescending(c => c.Address.Country).ThenByDescending(c => c.CustomerId)

Orm/Xtensive.Orm.Tests/ObjectModel/ChinookDO.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2010 Xtensive LLC.
1+
// Copyright (C) 2010 Xtensive LLC.
22
// All rights reserved.
33
// For conditions of distribution and use, see license.
44
// Created by: Denis Kudelin
@@ -153,7 +153,9 @@ public override void Import(Dictionary<string, object> fields, ImportContext con
153153
StreetAddress = (string) fields["StreetAddress"],
154154
City = (string) fields["City"],
155155
State = (string) fields["State"],
156-
Country = (string) fields["Country"],
156+
// USA and United Kingdom, depending on runtime and/or RDBMS, can be differently ordered
157+
// so not having abbreviation should resolve this issue.
158+
Country = ((string) fields["Country"]).Replace("USA", "United States", StringComparison.Ordinal),
157159
PostalCode = (string) fields["PostalCode"],
158160
},
159161
Phone = (string) fields["Phone"],

0 commit comments

Comments
 (0)