You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Alex Rudyy (JIRA)" <ji...@apache.org> on 2015/06/01 14:07:17 UTC

[jira] [Created] (QPID-6562) Test BDBHAVirtualHostNodeRestTest.testMutateStateOfOneNode fails sporadically

Alex Rudyy created QPID-6562:
--------------------------------

             Summary: Test BDBHAVirtualHostNodeRestTest.testMutateStateOfOneNode fails sporadically
                 Key: QPID-6562
                 URL: https://issues.apache.org/jira/browse/QPID-6562
             Project: Qpid
          Issue Type: Bug
            Reporter: Alex Rudyy


Error Message

Node 1 observed from node 2 is in the wrong state expected:<UNAVAILABLE> but was:<ACTIVE>

Stacktrace
{noformat}
junit.framework.AssertionFailedError: Node 1 observed from node 2 is in the wrong state expected:<UNAVAILABLE> but was:<ACTIVE>
	at junit.framework.Assert.fail(Assert.java:57)
	at junit.framework.Assert.failNotEquals(Assert.java:329)
	at junit.framework.Assert.assertEquals(Assert.java:78)
	at junit.framework.TestCase.assertEquals(TestCase.java:244)
	at org.apache.qpid.server.store.berkeleydb.replication.BDBHAVirtualHostNodeRestTest.testMutateStateOfOneNode(BDBHAVirtualHostNodeRestTest.java:127)
{noformat}

The tests calls remote replication node REST service to verify that state of the remote node is UNVAILABLE after its shutdown.

There are 2 issues found as result of test failure investigation:
1) the initial state of remote node is ACTIVE rather then UNVAILABLE. The real state is only set after retrieving state information with help of DBPing. Before that the node state is undetermined. 
2) the test does not wait for DBPing invocation: when node is shutdown other nodes in the cluster have not run DbPing yet identify the state. As result, when DBPing is invoked after node is shutdown the state is not changed to UNVAILABLE because state is evaluated from the role and role has not changed as it was UNRECHABLE and remained UNRECHABLE after DbPing.

In order to fix the failure the following can be done:
* Set state on remote node to UNDEFINED by default
* Change the test to verify that remote nodes up and their state is ACTIVE before shutting down the node




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org