-
Notifications
You must be signed in to change notification settings - Fork 641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failing Test: Lucene.Net.Search.Join.TestJoinUtil::TestMultiValueRandomJoin() #549
Comments
…NET Framework x86 with optimizations enabled (fixes apache#549 / Lucene.Net.Search.TestJoinUtil::TestMultiValueRandomJoin())
…NET Framework x86 with optimizations enabled (fixes apache#549 / Lucene.Net.Search.TestJoinUtil::TestMultiValueRandomJoin())
…NET Framework x86 with optimizations enabled (fixes #549 / Lucene.Net.Search.TestJoinUtil::TestMultiValueRandomJoin())
Wow! You found one of the really hard bugs -- one that only fails in release mode with optimizations enabled. Wow -- Well done! |
Actually, I was able to rule a lot of stuff out right away because it only failed under rare circumstances, I was able to isolate it to the That said, I haven't come up with a good explanation why casting fixes it but using |
This test only started failing after fixing the test framework to randomize the codecs, culture and time zone (NUnit's Randomizer was always initialized with a seed of 0, so none of these were actually random).
It only fails on .NET Framework under x86 on Windows, and only when optimizations are enabled (Release mode). I have confirmed that the test is 100% repeatable with the below seed and culture.
So far, all similar failures have been due to one of two things:
==
,>=
,<=
,>
, or<
. To fix these, converting thefloat
data type to anint
for both sides of the comparison has worked usingLucene.Net.Util.NumericUtils.SingleToSortableInt32()
.float
is being assigned to adouble
, which makes it change in precision. A place to watch out for are theMath
functions that acceptdouble
as a parameter but are passed afloat
. For score values which can only be between 0 and 1, doing an intermediate cast to adecimal
works (double x = (double)(decimal)theFloat
). However, we haven't found a solution that works in more general cases because this could overflow thedecimal
for large numbers.Failure 1
See: https://dev.azure.com/LuceneNET-Temp/Lucene.NET/_build/results?buildId=1793&view=ms.vss-test-web.build-test-results-tab&runId=727036&resultId=100024&paneView=debug to download the test artifacts, but do note that the build will be cleaned up after 30 days.
Failure 2
See: https://dev.azure.com/lucene-net-temp4/Main/_build/results?buildId=77&view=ms.vss-test-web.build-test-results-tab&runId=60166&resultId=100022&paneView=debug to download the test artifacts, but do note that the build will be cleaned up after 30 days.
Failure 3
See: https://dev.azure.com/lucene-net-temp3/Lucene.NET/_build/results?buildId=593&view=ms.vss-test-web.build-test-results-tab&runId=432744&resultId=100024&paneView=debug to download the test artifacts, but do note that the build will be cleaned up after 30 days.
The text was updated successfully, but these errors were encountered: