: I'm consistently getting the error below when running tests, updated
: checkout of Solr 3x, no changes to the code.
:
: Note, in my case, it isn't necessary to specify the seed at all, "ant
: test -Dtestcase=TestSolrEntityProcessorUnit" fails all by itself.
i don't see a failure, but skimming the code it looks fairly broken to
me...
: for (Entry<String,Object> entry : row.entrySet()) {
: assertEquals(expectedDoc[i][0], entry.getKey());
: assertEquals(expectedDoc[i][1], entry.getValue());
: i++;
: }
...those lines are assuming that row.entrySet will return something that
has a predictible iteration order, but row is a Map of unknown creation
(returned by the entityProcessor) ... so unless the entityProcessor is
explicitly defined as returning something like SortedMap (which isn't
suggested anywhere in this test) the test is making a really bad
assumption.
it looks like the "expectedDoc" data structure should be some sort of map
that is then compared to row (possibly by just doing and assertEquals on
the respective entrySets)
-Hoss
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]