summaryrefslogtreecommitdiff
path: root/java/systests
diff options
context:
space:
mode:
authorAlex Rudyy <orudyy@apache.org>2013-04-19 15:50:48 +0000
committerAlex Rudyy <orudyy@apache.org>2013-04-19 15:50:48 +0000
commit03222bbf6ff76ce66d3ab8a07f3edf46fae05ad5 (patch)
tree155bb580754a89fb5895864be8a9ea6203aef9bc /java/systests
parenta00e98098a537183289444df61ab1dadce4f7b92 (diff)
downloadqpid-python-03222bbf6ff76ce66d3ab8a07f3edf46fae05ad5.tar.gz
QPID-4755: Rename broker attribute 'supportedStoreTypes' into 'virtualHostSupportedStoreTypes' and introduce new attribute for broker supported store types
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1469917 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/systests')
-rw-r--r--java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestHttpsTest.java2
-rw-r--r--java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestTest.java14
2 files changed, 14 insertions, 2 deletions
diff --git a/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestHttpsTest.java b/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestHttpsTest.java
index 0c590ad1d8..8fe342e394 100644
--- a/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestHttpsTest.java
+++ b/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestHttpsTest.java
@@ -63,7 +63,7 @@ public class BrokerRestHttpsTest extends QpidRestTestCase
Map<String, Object> brokerDetails = getRestTestHelper().getJsonAsSingletonList("/rest/broker");
Asserts.assertAttributesPresent(brokerDetails, Broker.AVAILABLE_ATTRIBUTES, Broker.BYTES_RETAINED,
- Broker.PROCESS_PID, Broker.SUPPORTED_STORE_TYPES, Broker.CREATED, Broker.TIME_TO_LIVE, Broker.UPDATED,
+ Broker.PROCESS_PID, Broker.SUPPORTED_VIRTUALHOST_STORE_TYPES, Broker.CREATED, Broker.TIME_TO_LIVE, Broker.UPDATED,
Broker.ACL_FILE);
}
}
diff --git a/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestTest.java b/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestTest.java
index 7b1b1ca8be..4bca63204d 100644
--- a/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestTest.java
+++ b/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestTest.java
@@ -29,11 +29,13 @@ import java.util.List;
import java.util.Map;
import org.apache.qpid.common.QpidProperties;
+import org.apache.qpid.server.configuration.BrokerConfigurationStoreCreator;
import org.apache.qpid.server.model.Broker;
import org.apache.qpid.server.model.LifetimePolicy;
import org.apache.qpid.server.model.Port;
import org.apache.qpid.server.model.State;
import org.apache.qpid.server.model.VirtualHost;
+import org.apache.qpid.server.store.MessageStoreCreator;
import org.apache.qpid.test.utils.QpidTestCase;
import org.apache.qpid.test.utils.TestBrokerConfiguration;
@@ -210,7 +212,7 @@ public class BrokerRestTest extends QpidRestTestCase
protected void assertBrokerAttributes(Map<String, Object> brokerDetails)
{
Asserts.assertAttributesPresent(brokerDetails, Broker.AVAILABLE_ATTRIBUTES,
- Broker.BYTES_RETAINED, Broker.PROCESS_PID, Broker.SUPPORTED_STORE_TYPES,
+ Broker.BYTES_RETAINED, Broker.PROCESS_PID,
Broker.CREATED, Broker.TIME_TO_LIVE, Broker.UPDATED, Broker.ACL_FILE);
assertEquals("Unexpected value of attribute " + Broker.BUILD_VERSION, QpidProperties.getBuildVersion(),
@@ -234,6 +236,16 @@ public class BrokerRestTest extends QpidRestTestCase
assertNotNull("Unexpected value of attribute virtualhosts", brokerDetails.get(BROKER_VIRTUALHOSTS_ATTRIBUTE));
assertNotNull("Unexpected value of attribute ports", brokerDetails.get(BROKER_PORTS_ATTRIBUTE));
assertNotNull("Unexpected value of attribute authenticationproviders", brokerDetails.get(BROKER_AUTHENTICATIONPROVIDERS_ATTRIBUTE));
+
+ @SuppressWarnings("unchecked")
+ Collection<String> supportedBrokerStoreTypes = (Collection<String>)brokerDetails.get(Broker.SUPPORTED_BROKER_STORE_TYPES);
+ Collection<String> expectedSupportedBrokerStoreTypes = new BrokerConfigurationStoreCreator().getStoreTypes();
+ assertEquals("Unexpected supported broker store types", new HashSet<String>(expectedSupportedBrokerStoreTypes), new HashSet<String>(supportedBrokerStoreTypes));
+
+ @SuppressWarnings("unchecked")
+ Collection<String> supportedVirtualHostStoreTypes = (Collection<String>)brokerDetails.get(Broker.SUPPORTED_VIRTUALHOST_STORE_TYPES);
+ Collection<String> expectedSupportedVirtualHostStoreTypes = new MessageStoreCreator().getStoreTypes();
+ assertEquals("Unexpected supported virtual host store types", new HashSet<String>(expectedSupportedVirtualHostStoreTypes), new HashSet<String>(supportedVirtualHostStoreTypes));
}
}