You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2019/09/06 09:01:11 UTC
[lucenenet] 01/21: BUG:
Lucene.Net.Tests.Util.Fst.TestFSTs.TestPrimaryKeys(): Fixed sorting issue
that was causing the test to fail with negative values.
This is an automated email from the ASF dual-hosted git repository.
nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git
commit b56aac29a3da32aba25dc821992c580c0dbc3486
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Sun Sep 1 11:47:02 2019 +0700
BUG: Lucene.Net.Tests.Util.Fst.TestFSTs.TestPrimaryKeys(): Fixed sorting issue that was causing the test to fail with negative values.
---
src/Lucene.Net.Tests/Util/Fst/TestFSTs.cs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/Lucene.Net.Tests/Util/Fst/TestFSTs.cs b/src/Lucene.Net.Tests/Util/Fst/TestFSTs.cs
index 0c2faf3..1cd5172 100644
--- a/src/Lucene.Net.Tests/Util/Fst/TestFSTs.cs
+++ b/src/Lucene.Net.Tests/Util/Fst/TestFSTs.cs
@@ -1052,7 +1052,7 @@ namespace Lucene.Net.Util.Fst
{
while (true)
{
- string s = Convert.ToString(Random.NextInt64());
+ string s = Convert.ToString(Random.NextInt64(), CultureInfo.InvariantCulture);
if (!allIDs.Contains(s))
{
idString = s;
@@ -1073,8 +1073,8 @@ namespace Lucene.Net.Util.Fst
w.Dispose();
IList<string> allIDsList = new List<string>(allIDs);
- List<string> sortedAllIDsList = new List<string>(allIDsList);
- sortedAllIDsList.Sort();
+ IList<string> sortedAllIDsList = new List<string>(allIDsList);
+ CollectionUtil.TimSort(sortedAllIDsList);
// Sprinkle in some non-existent PKs:
HashSet<string> outOfBounds = new HashSet<string>();
@@ -1089,7 +1089,7 @@ namespace Lucene.Net.Util.Fst
{
while (true)
{
- idString = Convert.ToString(Random.NextInt64());
+ idString = Convert.ToString(Random.NextInt64(), CultureInfo.InvariantCulture);
if (!allIDs.Contains(idString))
{
break;