lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Muir <>
Subject Re: TestGrouping.Java seems to combine multiple tests into one huge test
Date Tue, 18 Jun 2013 17:13:42 GMT
On Tue, Jun 18, 2013 at 9:48 AM, Tom Burton-West <> wrote:

> Hello,
> I'm trying to understand BlockGroupingCollector.   I thought I would start
> by running the tests in the debugger.  However the only test I can find is
> lucene/grouping/src/test/org/apache/lucene/search/grouping/
> In,  in the second test, "testRandom" it seems like a
> fairly large number of things are tested, including a test of
> BlockGroupingCollector.
> I'm having a hard time understanding the tests and wonder if perhaps
> might be refactored to make it easier to understand.
> Is there some reason that separate tests are not broken out?
> I also could not find setup and teardown methods.  Is there some reason
> they are not being used?
> Would it make sense to open a JIRA issue to refactor to
> make a clearer separation between different things being tested?
> In particular, perhaps BlockGroupingCollector could have a separate test?

+1, I think it would be great to simplify this. This test seems to be
testing the entire kitchen sink: grouping by function, simulating
distributed grouping, grouping by docvalues, etc.

Refactoring this test would be fantastic, but I wouldn't want to take it on

Maybe an easier step would be to rename this test something like
TestRandomGrouping, and add some brand new very simple-easy-to-understand
tests to a new file(s).

Something that looks more like

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message