phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Heather <>
Subject Pull request for fix for PHOENIX-2257
Date Tue, 06 Oct 2015 10:23:14 GMT

I've submitted a pull request for fixing a test 
(DerivedTableIT.testDerivedTableWithGroupBy()), which passed on Java 7 
but not on Java 8.

The test was retrieving two rows from a query with no ORDER BY clause, 
and assuming that they would come back in a specific order. This 
happened to match the order that Java 7 returned them in, but the order 
has changed in Java 8.

Test fixed by not assuming any particular order.

It may be that there are other existing tests around that are doing 
something similar. Obviously anything that returns 0 rows or 1 row will 
not be a problem, but any test that runs a query that returns multiple 
rows, and relies on a specific return order without specifying an ORDER 
BY clause, is fragile.

(It would be possible to fix by adding an ORDER BY clause instead, of 
course, but that would change what's being tested, which might or might 
not be acceptable.)

I also converted a field to a local variable (since it was used only in 
one place), and let IntelliJ clean up the import statements. Hopefully 
that's not a problem.


View raw message