lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [1/2] lucenenet git commit: Lucene.Net.Tests.Support.TestLurchTableThreading: Removed test for NextHashCollision and assert within NextHashCollision because the underlying Guid implementation has changed in .NET Core 2.0 and this approach no longer works
Date Mon, 11 Sep 2017 10:38:58 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/master 25e972fca -> e74086656


Lucene.Net.Tests.Support.TestLurchTableThreading: Removed test for NextHashCollision and assert
within NextHashCollision because the underlying Guid implementation has changed in .NET Core
2.0 and this approach no longer works.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/b72b3dac
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/b72b3dac
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/b72b3dac

Branch: refs/heads/master
Commit: b72b3dac1c68dd9be0cc35e04c8df5ec5e822fc3
Parents: 25e972f
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Mon Sep 11 16:42:36 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Mon Sep 11 16:42:36 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests/Support/TestLurchTableThreading.cs | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b72b3dac/src/Lucene.Net.Tests/Support/TestLurchTableThreading.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Support/TestLurchTableThreading.cs b/src/Lucene.Net.Tests/Support/TestLurchTableThreading.cs
index 8e34226..79b0841 100644
--- a/src/Lucene.Net.Tests/Support/TestLurchTableThreading.cs
+++ b/src/Lucene.Net.Tests/Support/TestLurchTableThreading.cs
@@ -74,6 +74,10 @@ namespace Lucene.Net.Support
             Trace.TraceInformation("Execution time: {0}", timer.Elapsed);
         }
 
+        // LUCENENET TODO: For some reason, this logic depends on the underlying
+        // implementation of Guid.NewGuid(), which has changed in .NET Core 2.0.
+        // But the functionality of LurchTable seems unaffected by this change.
+#if !NETCOREAPP2_0
         [Test, LuceneNetSpecific]
         public void TestGuidHashCollision()
         {
@@ -83,6 +87,7 @@ namespace Lucene.Net.Support
             Assert.AreNotEqual(id1, id2);
             Assert.AreEqual(id1.GetHashCode(), id2.GetHashCode());
         }
+#endif
 
         [Test, LuceneNetSpecific]
         public void TestLimitedInsert()
@@ -212,7 +217,7 @@ namespace Lucene.Net.Support
             public int Count;
         };
 
-        #region Guid Hash Collision Generator
+#region Guid Hash Collision Generator
 
         private static Random random = new Random();
         private static int iCounter = 0x01010101;
@@ -243,7 +248,9 @@ namespace Lucene.Net.Support
             );
 
             Guid result = new Guid(bytes);
+#if !NETCOREAPP2_0
             Assert.AreEqual(guid.GetHashCode(), result.GetHashCode());
+#endif
             return result;
         }
 
@@ -266,6 +273,6 @@ namespace Lucene.Net.Support
             }
             return sample;
         }
-        #endregion
+#endregion
     }
 }


Mime
View raw message