I found the answer...
Change lines in the test from this:
assertThat(candidate.size()).isEqualTo(8);
To this:
assertThat(candidate.getCandidates()).hasSize(8);
And now I get this failure which is much more helpful:
Sep 27, 2018 4:36:50 PM org.springframework.shell.core.SimpleParser
displayHelp
INFO:
required --loglevel: Log level to change to
java.lang.AssertionError:
Expected size:<8> but was:<10> in:
<[0. null - =ALL,
0. null - =DEBUG,
0. null - =DETAIL,
0. null - =ERROR,
0. null - =FATAL,
0. null - =INFO,
0. null - =NOTE,
0. null - =OFF,
0. null - =TRACE,
0. null - =WARN]>
at
org.apache.geode.management.internal.cli.GfshParserAutoCompletionTest.testCompleteLogLevel(GfshParserAutoCompletionTest.java:258)
On Thu, Sep 27, 2018 at 4:20 PM, Kirk Lund <[email protected]> wrote:
> Does anyone know GfshParserRule well enough that we could make the test
> failures provide some useful info?
>
> If you could give me some pointers on where/what to improve I'm happy to
> do the footwork. Or if you prefer to do that's fine as well.
>
> For example, I have a PR with GfshParserAutoCompletionTest but the
> failure is completely unhelpful as far as telling me why or how it failed.
>
> > Task :geode-core:integrationTest
>
> org.apache.geode.management.internal.cli.GfshParserAutoCompletionTest >
> testCompletLogLevel FAILED
> org.junit.ComparisonFailure: expected:<[8]> but was:<[10]>
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(
> NativeConstructorAccessorImpl.java:62)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
> DelegatingConstructorAccessorImpl.java:45)
> at org.apache.geode.management.internal.cli.
> GfshParserAutoCompletionTest.testCompletLogLevel(
> GfshParserAutoCompletionTest.java:257)
>
> org.apache.geode.management.internal.cli.GfshParserAutoCompletionTest >
> testCompletLogLevelWithEqualSign FAILED
> org.junit.ComparisonFailure: expected:<[8]> but was:<[10]>
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(
> NativeConstructorAccessorImpl.java:62)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
> DelegatingConstructorAccessorImpl.java:45)
> at org.apache.geode.management.internal.cli.
> GfshParserAutoCompletionTest.testCompletLogLevelWithEqualSign(
> GfshParserAutoCompletionTest.java:265)
>