You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by "Kenneth Howe (JIRA)" <ji...@apache.org> on 2017/03/01 21:25:45 UTC

[jira] [Commented] (GEODE-2541) NetstatDUnitTest fails with ClassCastException

    [ https://issues.apache.org/jira/browse/GEODE-2541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15891065#comment-15891065 ] 

Kenneth Howe commented on GEODE-2541:
-------------------------------------

The failure from ClassCastException results from org.apache.geode.management.internal.cli.HeadlessGfsh not handling a command results that's not a Result object as expected by the test rule.

The underlying cause of the test failure was a remote VM ran out of heap memory. The netstat command that gfsh was executing returned an error string instead of a CommandResult object, so the explicit cast in GfshShellConnectionRule threw the exception.

> NetstatDUnitTest fails with ClassCastException
> ----------------------------------------------
>
>                 Key: GEODE-2541
>                 URL: https://issues.apache.org/jira/browse/GEODE-2541
>             Project: Geode
>          Issue Type: Bug
>          Components: gfsh, tests
>            Reporter: Kirk Lund
>            Assignee: Kenneth Howe
>              Labels: MiscellaneousCommands, NetstatCommand, gfsh, netstat
>
> This might be a bug in the error handling code for gfsh or the functions used by MiscellaneousCommands.
> {noformat}
> org.apache.geode.management.internal.cli.NetstatDUnitTest > testConnectToJmxManagerOne FAILED
>     org.junit.ComparisonFailure: [{"errorCode":505,"message":["Could not process command due to GemFire error. Error occurred while executing netstat on [server-1]"]}] expected:<[OK]> but was:<[ERROR]>
>         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.test.dunit.rules.GfshShellConnectionRule.executeAndVerifyCommand(GfshShellConnectionRule.java:168)
>         at org.apache.geode.management.internal.cli.NetstatDUnitTest.testConnectToJmxManagerOne(NetstatDUnitTest.java:82)
> org.apache.geode.management.internal.cli.NetstatDUnitTest > testConnectToJmxManagerTwo FAILED
>     java.lang.ClassCastException: java.lang.String cannot be cast to org.apache.geode.management.internal.cli.result.CommandResult
>         at org.apache.geode.test.dunit.rules.GfshShellConnectionRule.executeCommand(GfshShellConnectionRule.java:159)
>         at org.apache.geode.test.dunit.rules.GfshShellConnectionRule.executeAndVerifyCommand(GfshShellConnectionRule.java:166)
>         at org.apache.geode.management.internal.cli.NetstatDUnitTest.testConnectToJmxManagerTwo(NetstatDUnitTest.java:88)
> org.apache.geode.management.internal.cli.NetstatDUnitTest > testConnectToLocator FAILED
>     org.junit.ComparisonFailure: [{"errorCode":520,"message":["Could not find member(s) with Id(s) or name(s): server-1."]}] expected:<[OK]> but was:<[ERROR]>
>         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.test.dunit.rules.GfshShellConnectionRule.executeAndVerifyCommand(GfshShellConnectionRule.java:168)
>         at org.apache.geode.management.internal.cli.NetstatDUnitTest.testConnectToLocator(NetstatDUnitTest.java:76)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)