diff options
| author | Robert Godfrey <rgodfrey@apache.org> | 2014-05-02 20:32:16 +0000 |
|---|---|---|
| committer | Robert Godfrey <rgodfrey@apache.org> | 2014-05-02 20:32:16 +0000 |
| commit | db543bd85497285b1911c7250a9a1f76522f318b (patch) | |
| tree | 0a88c2e19a1a8e3e4bedf49ab0a4ef7248d25603 /qpid/java/bdbstore/src/test | |
| parent | 1af82f62bbf94323e61a415c182adf2d66ac99f0 (diff) | |
| download | qpid-python-db543bd85497285b1911c7250a9a1f76522f318b.tar.gz | |
QPID-5746 : [Java Broker] Split attribute annotations into separate annotations for derived and automated, and allow derived attributes to be persisted
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1592030 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/bdbstore/src/test')
| -rw-r--r-- | qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostNodeTest.java | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostNodeTest.java b/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostNodeTest.java index 5e5458b382..49205930ea 100644 --- a/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostNodeTest.java +++ b/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostNodeTest.java @@ -33,6 +33,9 @@ import java.util.UUID; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; +import com.sleepycat.je.rep.ReplicatedEnvironment; +import com.sleepycat.je.rep.ReplicationConfig; + import org.apache.qpid.server.configuration.updater.TaskExecutor; import org.apache.qpid.server.configuration.updater.TaskExecutorImpl; import org.apache.qpid.server.model.Broker; @@ -52,9 +55,6 @@ import org.apache.qpid.server.virtualhostnode.berkeleydb.BDBHAVirtualHostNode; import org.apache.qpid.test.utils.QpidTestCase; import org.apache.qpid.util.FileUtils; -import com.sleepycat.je.rep.ReplicatedEnvironment; -import com.sleepycat.je.rep.ReplicationConfig; - public class BDBHAVirtualHostNodeTest extends QpidTestCase { @@ -89,7 +89,7 @@ public class BDBHAVirtualHostNodeTest extends QpidTestCase { try { - node.setDesiredState(node.getState(), State.DELETED); + node.setDesiredState(State.DELETED); } catch(Exception e) { @@ -175,7 +175,7 @@ public class BDBHAVirtualHostNodeTest extends QpidTestCase { } }); - assertEquals(State.ACTIVE, node.setDesiredState(node.getState(), State.ACTIVE)); + assertEquals(State.ACTIVE, node.setDesiredState(State.ACTIVE)); DurableConfigurationStore store = node.getConfigurationStore(); assertNotNull(store); @@ -200,13 +200,13 @@ public class BDBHAVirtualHostNodeTest extends QpidTestCase assertEquals("Unexpected virtual host store", store, virtualHost.getMessageStore()); assertEquals("Unexpected virtual host state", State.ACTIVE, virtualHost.getState()); - State currentState = node.setDesiredState(State.ACTIVE, State.STOPPED); + State currentState = node.setDesiredState(State.STOPPED); assertEquals("Unexpected state returned after stop", State.STOPPED, currentState); assertEquals("Unexpected state", State.STOPPED, node.getState()); assertNull("Virtual host is not destroyed", node.getVirtualHost()); - currentState = node.setDesiredState(State.STOPPED, State.DELETED); + currentState = node.setDesiredState(State.DELETED); assertEquals("Unexpected state returned after delete", State.DELETED, currentState); assertEquals("Unexpected state", State.DELETED, node.getState()); assertFalse("Store still exists", _bdbStorePath.exists()); @@ -228,7 +228,7 @@ public class BDBHAVirtualHostNodeTest extends QpidTestCase BDBHAVirtualHostNode<?> node = createHaVHN(attributes); - assertEquals("Failed to activate node", State.ACTIVE, node.setDesiredState(node.getState(), State.ACTIVE)); + assertEquals("Failed to activate node", State.ACTIVE, node.setDesiredState(State.ACTIVE)); BDBMessageStore bdbMessageStore = (BDBMessageStore) node.getConfigurationStore(); ReplicatedEnvironment environment = (ReplicatedEnvironment) bdbMessageStore.getEnvironmentFacade().getEnvironment(); @@ -265,7 +265,7 @@ public class BDBHAVirtualHostNodeTest extends QpidTestCase node1Attributes.put(BDBHAVirtualHostNode.STORE_PATH, _bdbStorePath + File.separator + "1"); BDBHAVirtualHostNode<?> node1 = createHaVHN(node1Attributes); - assertEquals("Failed to activate node", State.ACTIVE, node1.setDesiredState(node1.getState(), State.ACTIVE)); + assertEquals("Failed to activate node", State.ACTIVE, node1.setDesiredState(State.ACTIVE)); int node2PortNumber = getNextAvailable(node1PortNumber+1); @@ -279,7 +279,7 @@ public class BDBHAVirtualHostNodeTest extends QpidTestCase node2Attributes.put(BDBHAVirtualHostNode.STORE_PATH, _bdbStorePath + File.separator + "2"); BDBHAVirtualHostNode<?> node2 = createHaVHN(node2Attributes); - assertEquals("Failed to activate node2", State.ACTIVE, node2.setDesiredState(node2.getState(), State.ACTIVE)); + assertEquals("Failed to activate node2", State.ACTIVE, node2.setDesiredState(State.ACTIVE)); int node3PortNumber = getNextAvailable(node2PortNumber+1); Map<String, Object> node3Attributes = new HashMap<String, Object>(); @@ -291,7 +291,7 @@ public class BDBHAVirtualHostNodeTest extends QpidTestCase node3Attributes.put(BDBHAVirtualHostNode.HELPER_ADDRESS, helperAddress); node3Attributes.put(BDBHAVirtualHostNode.STORE_PATH, _bdbStorePath + File.separator + "3"); BDBHAVirtualHostNode<?> node3 = createHaVHN(node3Attributes); - assertEquals("Failed to activate node3", State.ACTIVE, node3.setDesiredState(node3.getState(), State.ACTIVE)); + assertEquals("Failed to activate node3", State.ACTIVE, node3.setDesiredState(State.ACTIVE)); BDBHAVirtualHostNode<?> replica = null; int findReplicaCount = 0; @@ -335,7 +335,7 @@ public class BDBHAVirtualHostNodeTest extends QpidTestCase node1Attributes.put(BDBHAVirtualHostNode.STORE_PATH, _bdbStorePath + File.separator + "1"); BDBHAVirtualHostNode<?> node1 = createHaVHN(node1Attributes); - assertEquals("Failed to activate node", State.ACTIVE, node1.setDesiredState(node1.getState(), State.ACTIVE)); + assertEquals("Failed to activate node", State.ACTIVE, node1.setDesiredState(State.ACTIVE)); final CountDownLatch remoteNodeLatch = new CountDownLatch(2); node1.addChangeListener(new ConfigurationChangeListener() @@ -378,7 +378,7 @@ public class BDBHAVirtualHostNodeTest extends QpidTestCase node2Attributes.put(BDBHAVirtualHostNode.STORE_PATH, _bdbStorePath + File.separator + "2"); BDBHAVirtualHostNode<?> node2 = createHaVHN(node2Attributes); - assertEquals("Failed to activate node2", State.ACTIVE, node2.setDesiredState(node2.getState(), State.ACTIVE)); + assertEquals("Failed to activate node2", State.ACTIVE, node2.setDesiredState(State.ACTIVE)); int node3PortNumber = getNextAvailable(node2PortNumber+1); Map<String, Object> node3Attributes = new HashMap<String, Object>(); @@ -390,7 +390,7 @@ public class BDBHAVirtualHostNodeTest extends QpidTestCase node3Attributes.put(BDBHAVirtualHostNode.HELPER_ADDRESS, helperAddress); node3Attributes.put(BDBHAVirtualHostNode.STORE_PATH, _bdbStorePath + File.separator + "3"); BDBHAVirtualHostNode<?> node3 = createHaVHN(node3Attributes); - assertEquals("Failed to activate node3", State.ACTIVE, node3.setDesiredState(node3.getState(), State.ACTIVE)); + assertEquals("Failed to activate node3", State.ACTIVE, node3.setDesiredState(State.ACTIVE)); assertTrue("Replication nodes have not been seen during 5s", remoteNodeLatch.await(5, TimeUnit.SECONDS)); @@ -429,7 +429,7 @@ public class BDBHAVirtualHostNodeTest extends QpidTestCase node1Attributes.put(BDBHAVirtualHostNode.STORE_PATH, _bdbStorePath + File.separator + "1"); BDBHAVirtualHostNode<?> node = createHaVHN(node1Attributes); - assertEquals("Failed to activate node", State.ACTIVE, node.setDesiredState(node.getState(), State.ACTIVE)); + assertEquals("Failed to activate node", State.ACTIVE, node.setDesiredState(State.ACTIVE)); assertNodeRole(node, "MASTER"); |
