namhnguyen / asterixdb

Automatically exported from code.google.com/p/asterixdb
0 stars 0 forks source link

Tests use string comparison for results, even where not appropriate #856

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run `mvn install` on the asterix root directory on a machine which does not 
use the `.` (dot) as its default decimal mark.

What is the expected output? What do you see instead?

You should expect all test to pass. Instead the fuzzy join test fails on an 
Assertion error.
The test expects the output : 65 63 0.500
Instead the test receives the output : 65 63 0,500

As a temporary fix for this problem, I changed the locale for my entire machine 
to the English language instead of French, but anyone in Europe (outside the 
UK) who wishes to run the code will run into the same problem.

Original issue reported on code.google.com by jules.te...@gmail.com on 24 Feb 2015 at 12:42

GoogleCodeExporter commented 9 years ago
@Inci: can you provide some thoughts on this issue?

Original comment by che...@gmail.com on 24 Feb 2015 at 5:52

GoogleCodeExporter commented 9 years ago
I don't think there is anything fuzzy-join specific in this issue.
It's just a rigid design of our test framework, which compares results as 
strings (see edu.uci.ics.asterix.test.aql.TestsUtils for the reference). Note 
from the code that floating-point numbers are special case and semi-parsed and 
compared separately. The issue could be fixed locally, but I believe it should 
be a part of Issue 819, which adopts i18n techniques

Original comment by ildar.absalyamov on 24 Feb 2015 at 6:20

GoogleCodeExporter commented 9 years ago
OK. Understood. Can we change the title of this issue to make it more accurate?

Original comment by che...@gmail.com on 24 Feb 2015 at 7:14

GoogleCodeExporter commented 9 years ago
As Ildar said, this limitation has been known for a while. It will definitely 
cause issues in other cases (e.x. testing and comparing results on a cluster) 
where the order of results will not necessarily be the same. 

Original comment by ima...@uci.edu on 24 Feb 2015 at 8:11