[jboss-jira] [JBoss JIRA] (WFLY-4850) ManagementClient.isServerInRunningState fails when server is stopped
Ondřej Chaloupka (JIRA)
issues at jboss.org
Wed Jul 29 04:00:07 EDT 2015
[ https://issues.jboss.org/browse/WFLY-4850?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13093775#comment-13093775 ]
Ondřej Chaloupka commented on WFLY-4850:
----------------------------------------
I have to admit that the test is a bit old and could be reworked. But the reason why it was ignored was already solved some time ago - jira https://issues.jboss.org/browse/AS7-4586. Thus the test could be activated to be run.
I have tried to applied your fix from https://github.com/wildfly/wildfly-arquillian/pull/30 and it solves the problem. After applying the fix the test passes smoothly.
The reason why the exception {{java.lang.AssertionError: null}} is thrown is the check on {{shutdown}} status at https://github.com/wildfly/wildfly-core/blob/master/protocol/src/main/java/org/jboss/as/protocol/mgmt/ActiveOperationSupport.java#L151. I don't think that the problem is using already closed client.
Despite behavior of {{ActiveOperationSupport}} will be changed (as WFCORE-845 points to) the idea of this issue is that operation {{ManagementClient.isServerInRunningState}} should return {{true/false}} and not {{AssertionError}}. I completely understand that the API could be changed and instead of returning boolean value, exception could be thrown/returned. But then it could be pointed in javadoc.
> ManagementClient.isServerInRunningState fails when server is stopped
> --------------------------------------------------------------------
>
> Key: WFLY-4850
> URL: https://issues.jboss.org/browse/WFLY-4850
> Project: WildFly
> Issue Type: Bug
> Components: Test Suite
> Reporter: Ondřej Chaloupka
> Assignee: James Perkins
>
> Scenario: server is stopped (killed), working with arquillian to check if server is started or not
> Current implementation of the {{ManagementClient.isServerInRunningState}} catches only {{IOException}} (see [1]) and in such case false is returned. Otherwise exception is propagated upwards.
> That's a problem in case that assertions are enabled - which is true statement for wildfly testsuite (see pom.xml, surefire configuration and {{<enableAssertions>true</enableAssertions>}}). As state of the server is checked with assertions as well [2] then test fails on such assertion instead of getting false as server is stopped.
> In comparision with arquillian client for jboss-eap there is caught {{Throwable}} and returned false [3] which seems to me more correct.
> Could you, please, forwardport arquillian client behaviour from JBoss EAP to WildFly?
> [1] https://github.com/wildfly/wildfly-arquillian/blob/master/common/src/main/java/org/jboss/as/arquillian/container/ManagementClient.java#L197
> [2] https://github.com/wildfly/wildfly-core/blob/master/protocol/src/main/java/org/jboss/as/protocol/mgmt/ActiveOperationSupport.java#L151
> [3] https://github.com/jbossas/jboss-eap/blob/6.x/arquillian/common/src/main/java/org/jboss/as/arquillian/container/ManagementClient.java#L177
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
More information about the jboss-jira
mailing list