Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.4.0SDK
-
None
Description
Test case IteratorTest succeeded on my workstation but failed in Jenkins. This test was recently modified to be more thorough, and in particular, checks to see that a set index doesn't have multiples of the same key.
The failure was reproducable on my workstation by running with Sun Java version 1.5. Analysis of this showed that the code in the index repository implementation to find an index by name, for a particular type, was only checking if the index on a type had the same "comparator" - that is, the set of keys and compare order, as the "named" index. This failed to distinguish the case where there were 2 defined indexes, one being a "set", the other "sorted", with exactly the same comparator definitions, as is the case in this test. The result was the findIndex method picked the first one it found - and it found in the failing case, the sorted index.
Fix this by adding a test to findIndex that checks the indexType (e.g. Set, Sorted, Bag).