Author: fjuma
Date: 2009-02-27 13:01:00 -0500 (Fri, 27 Feb 2009)
New Revision: 174
Added:
trunk/jsfunit/testdata/destinations/ChangePropertiesExistingQueue-service.xml
trunk/jsfunit/testdata/destinations/ChangePropertiesExistingTopic-service.xml
trunk/jsfunit/testdata/destinations/DeleteQueueExistingFile-service.xml
trunk/jsfunit/testdata/destinations/DeleteTopicExistingFile-service.xml
trunk/jsfunit/testdata/destinations/UnsetPropertiesExistingQueue-service.xml
trunk/jsfunit/testdata/destinations/UnsetPropertiesExistingTopic-service.xml
Modified:
trunk/core/src/main/webapp/include/tabMenu.xhtml
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DatasourceTestBase.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/DatasourceTest.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/JMSTest.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/ResourceTestBase.java
Log:
Added deletion tests and configuration tests for topics and queues.
Modified: trunk/core/src/main/webapp/include/tabMenu.xhtml
===================================================================
--- trunk/core/src/main/webapp/include/tabMenu.xhtml 2009-02-27 09:14:01 UTC (rev 173)
+++ trunk/core/src/main/webapp/include/tabMenu.xhtml 2009-02-27 18:01:00 UTC (rev 174)
@@ -147,7 +147,7 @@
<h:panelGroup layout="block"
rendered="#{activeTab ne 'content' and
navigationAction.enabledTabs.contains('content')}">
<li>
- <s:link styleClass=""
view="/secure/resourceInstanceContent.xhtml" propagation="end">
+ <s:link id="contentTab" styleClass=""
view="/secure/resourceInstanceContent.xhtml" propagation="end">
#{messages['tab.menu.content']}
</s:link>
</li>
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DatasourceTestBase.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DatasourceTestBase.java 2009-02-27
09:14:01 UTC (rev 173)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DatasourceTestBase.java 2009-02-27
18:01:00 UTC (rev 174)
@@ -954,7 +954,7 @@
*/
protected void checkMetrics(String datasourceName,
DatasourceType datasourceType,
- Map<String, String> metricsMap) throws IOException
{
+ Map<String, String> metricsMap) throws IOException,
EmbJoprTestException {
refreshTreeNode("Datasources");
ClickableElement datasourceTypeArrow =
getNavTreeArrow(datasourceType.getLabel());
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java 2009-02-27
09:14:01 UTC (rev 173)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java 2009-02-27
18:01:00 UTC (rev 174)
@@ -49,6 +49,8 @@
import org.jboss.managed.api.ManagedDeployment;
import org.jboss.profileservice.spi.NoSuchDeploymentException;
import org.jboss.metatype.api.values.SimpleValueSupport;
+import org.jboss.jopr.jsfunit.exceptions.EmbJoprTestException;
+import java.io.File;
/**
@@ -63,21 +65,26 @@
*/
public abstract class EmbjoprTestCase extends ServletTestCase {
- protected final Logger log = Logger.getLogger(this.getClass().getName());
+ protected final Logger log = Logger.getLogger(this.getClass().getName());
protected boolean isJBoss4;
protected JSFClientSession client;
protected JSFServerSession server;
- public JSFClientSession getClient() { return client; }
- public JSFServerSession getServer() { return server; }
+ public static final String LOGIN_USERNAME = "admin";
+ public static final String LOGIN_PASSWORD = "admin";
+
+ // Tab Menu IDs
+ public static final String SUMMARY_TAB = "summaryTab";
+ public static final String METRICS_TAB = "metricsTab";
+ public static final String CONFIGURATION_TAB = "configurationTab";
+ public static final String CONTROL_TAB = "controlTab";
+ public static final String CONTENT_TAB = "contentTab";
+ public JSFClientSession getClient() { return client; }
+ public JSFServerSession getServer() { return server; }
- public static final String LOGIN_USERNAME = "admin";
- public static final String LOGIN_PASSWORD = "admin";
-
-
/**
* Start a JSFUnit session by logging in to the main page. Note that
* because setUp() is called before each test, a new HttpSession will be
@@ -189,6 +196,24 @@
}
/**
+ * Expand the nav tree arrow for the given resource.
+ */
+ public void expandNavTreeArrow(String resourceName) throws IOException {
+
+ // Expand the tree node
+ ClickableElement resourceArrow = getNavTreeArrow(resourceName);
+ resourceArrow.click();
+ }
+
+ /**
+ * Click on the given nav tree link.
+ */
+ public void clickNavTreeLink(String resourceName) throws IOException {
+ HtmlAnchor resourceLink = getNavTreeLink(resourceName);
+ resourceLink.click();
+ }
+
+ /**
* Finds the value of the given metric in the given metrics
* data table.
*/
@@ -330,32 +355,28 @@
*/
public void checkClientAndServerMessages(String expectedClientMsg,
String expectedServerMsg,
- boolean isErrorMsg)
- {
+ boolean isErrorMsg) {
- // In Faces
+ // Check that the expected message appears on the client side
+ assertTrue("This expected message was not found on the page: " +
expectedClientMsg,
+ client.getPageAsText().contains(expectedClientMsg));
+
+ // Check that the expected message appears on the server side
+ assertTrue("Expected message not found in faces messages (no messages in
Faces)",
+ server.getFacesMessages().hasNext());
- assertTrue("Expected message not found in faces messages (no messages in
Faces).",
- server.getFacesMessages().hasNext());
-
- FacesMessage message = server.getFacesMessages().next();
+ FacesMessage message = server.getFacesMessages().next();
if(isErrorMsg) {
- assertTrue(FacesMessage.SEVERITY_ERROR.equals(message.getSeverity()));
+ assertEquals("Incorrect message severity",
FacesMessage.SEVERITY_ERROR, message.getSeverity());
} else {
- assertTrue(FacesMessage.SEVERITY_INFO.equals(message.getSeverity()));
+ assertEquals("Incorrect message severity",
FacesMessage.SEVERITY_INFO, message.getSeverity());
}
- assertTrue("Expected message: "+expectedServerMsg+" Actual:
"+message.getDetail(),
- message.getDetail().contains(expectedServerMsg));
+
+ assertTrue("Expected message: " + expectedServerMsg + " Actual:
"+ message.getDetail(),
+ message.getDetail().contains(expectedServerMsg));
+ }
- // On page
-
- assertTrue("Expected message not found on page: "+expectedClientMsg,
- client.getPageAsText().contains(expectedClientMsg));
-
- }
-
-
/**
* Check that the given messages occur on the client side and server side.
* Given strings are treated as regular expressions to match.
@@ -387,14 +408,19 @@
/**
* Refresh the content under the given nav tree node.
*/
- public void refreshTreeNode(String nodeName) throws IOException {
-
- // Collapse and then expand the nav tree node
- ClickableElement nodeArrow = getNavTreeArrow(nodeName);
- nodeArrow.click();
+ public void refreshTreeNode(String nodeName) throws EmbJoprTestException {
+ try {
+ // Collapse and then expand the nav tree node
+ ClickableElement nodeArrow = getNavTreeArrow(nodeName);
+ nodeArrow.click();
- nodeArrow = getNavTreeArrow(nodeName);
- nodeArrow.click();
+ nodeArrow = getNavTreeArrow(nodeName);
+ nodeArrow.click();
+ } catch (IOException e) {
+ throw new EmbJoprTestException("An error occurred when trying " +
+ "to collapse and then expand the nav tree
" +
+ "arrow for " + nodeName, e);
+ }
}
/**
@@ -613,7 +639,7 @@
String converted = actual.replace(',', '.');
return looksLikeDouble(converted) ? converted : actual;
}
-
+
/**
* Transform the given map of Strings to MetaValues into a
* map of Strings to Strings.
@@ -641,24 +667,67 @@
String componentName,
ComponentType type) throws Exception {
+ Map<String, MetaValue> actualProperties =
getComponentProperties(componentName, type);
+
+ // Verify that the property values are correct
+ for(String propertyName : expectedProperties.keySet()) {
+ assertEquals("Incorrect value for '" + propertyName +
"'",
+ expectedProperties.get(propertyName),
+ actualProperties.get(propertyName));
+ }
+ }
+
+ /**
+ * Create a map of property names to property values for a particular
+ * component.
+ */
+ protected Map<String, MetaValue> getComponentProperties(String componentName,
+ ComponentType type) throws
Exception {
ManagedComponent component = getManagedComponent(componentName, type);
assertNotNull("The returned component was null", component);
assertEquals(componentName, component.getName());
Map<String, ManagedProperty> actualProperties = component.getProperties();
+ Map<String, MetaValue> propertiesMap = new HashMap<String,
MetaValue>();
ManagedProperty prop;
-
- // Verify that the property values are correct
- for(String propertyName : expectedProperties.keySet()) {
+
+ // Create a map of Strings to MetaValues
+ for(String propertyName : actualProperties.keySet()) {
prop = actualProperties.get(propertyName);
-
- assertEquals("Incorrect value for '" + propertyName +
"'",
- expectedProperties.get(propertyName),
- prop.getValue());
+ propertiesMap.put(propertyName, prop.getValue());
}
+
+ return propertiesMap;
}
/**
+ * Create a map of property names to property values for a particular
+ * component. The desired property names are given by specificProperties.
+ * (This is useful when we need to check the values of some specific properties
+ * only - eg. the configuration tests)
+ */
+ protected Map<String, MetaValue> getSpecificComponentProperties(String
componentName,
+ ComponentType type,
+ String
specificProperties[]) throws Exception {
+ ManagedComponent component = getManagedComponent(componentName, type);
+ assertNotNull("The returned component was null", component);
+ assertEquals(componentName, component.getName());
+
+ Map<String, ManagedProperty> actualProperties = component.getProperties();
+ Map<String, MetaValue> propertiesMap = new HashMap<String,
MetaValue>();
+ ManagedProperty prop;
+
+ // Create a map containing only the specified properties
+ for(int i = 0; i < specificProperties.length; i++) {
+ String propertyName = specificProperties[i];
+ prop = actualProperties.get(propertyName);
+ propertiesMap.put(propertyName, prop.getValue());
+ }
+
+ return propertiesMap;
+ }
+
+ /**
* Return a ManagedComponent, given the component name and type.
*/
protected ManagedComponent getManagedComponent(String componentName,
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/DatasourceTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/DatasourceTest.java 2009-02-27
09:14:01 UTC (rev 173)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/DatasourceTest.java 2009-02-27
18:01:00 UTC (rev 174)
@@ -32,6 +32,7 @@
import java.util.Map;
import javax.management.JMException;
import java.sql.Connection;
+import org.jboss.jopr.jsfunit.exceptions.EmbJoprTestException;
/**
* When complete, this class will contain tests for creating,
@@ -109,7 +110,7 @@
*/
protected void performDatasourceOperation(String datasourceName,
DatasourceType datasourceType,
- String operationName) throws IOException {
+ String operationName) throws IOException,
EmbJoprTestException {
navigateToPage(datasourceName, datasourceType, "controlTab");
@@ -129,7 +130,7 @@
*/
private void navigateToPage(String datasourceName,
DatasourceType datasourceType,
- String tabName) throws IOException {
+ String tabName) throws IOException, EmbJoprTestException
{
refreshTreeNode("Datasources");
ClickableElement datasourceTypeArrow =
getNavTreeArrow(datasourceType.getLabel());
@@ -241,7 +242,7 @@
/**
* Change the value of some already set properties.
*/
- public void testConfigureDatasourceChangeSetProperties() throws IOException {
+ public void testConfigureDatasourceChangeSetProperties() throws IOException,
EmbJoprTestException {
Map<String, String> propertiesMap =
createXADatasource("ChangeSetPropertiesDS");
assertTrue("Error creating datasource",
client.getPageAsText().contains("Successfully added"));
@@ -284,7 +285,7 @@
/**
* Change the value of some previously unset properties.
*/
- public void testConfigureDatasourceChangeUnsetProperties() throws IOException {
+ public void testConfigureDatasourceChangeUnsetProperties() throws IOException,
EmbJoprTestException {
Map<String, String> propertiesMap =
createLocalTXDatasource("ChangeUnsetPropertiesDS");
assertTrue("Error creating datasource",
client.getPageAsText().contains("Successfully added"));
@@ -329,7 +330,7 @@
/**
* Unset the value of some previously set properties.
*/
- public void testConfigureDatasourceUnsetProperties() throws IOException {
+ public void testConfigureDatasourceUnsetProperties() throws IOException,
EmbJoprTestException {
Map<String, String> propertiesMap =
createNoTXDatasource("UnsetPropertiesDS");
assertTrue("Error creating datasource",
client.getPageAsText().contains("Successfully added"));
@@ -375,7 +376,7 @@
/**
* Test the "Flush" operation after creating a new datasource.
*/
- public void testFlushOperationAfterDatasourceCreation() throws IOException {
+ public void testFlushOperationAfterDatasourceCreation() throws IOException,
EmbJoprTestException {
// Min pool size will be 6, max pool size will be 15
Map<String, String> propertiesMap =
createXADatasource("FlushAfterDatasourceCreationDS");
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/JMSTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/JMSTest.java 2009-02-27
09:14:01 UTC (rev 173)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/JMSTest.java 2009-02-27
18:01:00 UTC (rev 174)
@@ -29,10 +29,6 @@
import java.util.HashMap;
import java.util.Iterator;
import java.util.Set;
-import org.jdom.Document;
-import org.jdom.Element;
-import org.jdom.input.SAXBuilder;
-import java.io.File;
import org.jboss.jopr.jsfunit.*;
import javax.management.MBeanServer;
import javax.management.ObjectName;
@@ -41,6 +37,7 @@
import org.jboss.metatype.api.values.SimpleValueSupport;
import org.jboss.metatype.api.values.MetaValue;
import org.jboss.managed.api.ComponentType;
+import java.io.File;
/**
* This class contains tests for managing JMS topics and queues
@@ -74,11 +71,14 @@
}
}
+ // Constants
private static final String QUEUE_DEFAULT_TEMPLATE="default__Queue";
private static final String TOPIC_DEFAULT_TEMPLATE="default__Topic";
private static final String JMS_NAV_LABEL="JMS Destinations";
private static final ComponentType QUEUE_COMPONENT_TYPE =
KnownComponentTypes.JMSDestination.Queue.getType();
private static final ComponentType TOPIC_COMPONENT_TYPE =
KnownComponentTypes.JMSDestination.Topic.getType();
+ private static final String SERVICE_FILE_ROOT_ELEMENT = "server";
+ private static final String SERVICE_FILE_CHILD_ELEMENT = "mbean";
/**
* Create a new topic or queue using the given destination type and properties.
@@ -86,11 +86,7 @@
protected void createDestination(DestinationType destinationType,
String templateName,
Map<String, MetaValue> propertiesMap) throws
IOException {
-
- // Expand the "JMS Destinations" tree node
- ClickableElement datasourcesArrow = getNavTreeArrow(JMS_NAV_LABEL);
- datasourcesArrow.click();
-
+ expandNavTreeArrow(JMS_NAV_LABEL);
createResource(destinationType.getNavLabel(), templateName, propertiesMap);
}
@@ -100,10 +96,9 @@
* Assumes the JMS Destinations tree node is already expanded.
*/
protected void deleteDestination(DestinationType destinationType,
- String destinationName) throws IOException {
- HtmlAnchor datasourceLink = getNavTreeLink(destinationType.getNavLabel());
- datasourceLink.click();
-
+ String destinationName) throws Exception {
+ refreshTreeNode(JMS_NAV_LABEL);
+ clickNavTreeLink(destinationType.getNavLabel());
deleteResource("resourceSummaryForm", destinationName);
}
@@ -146,29 +141,57 @@
return propertiesMap;
}
+ protected String getDestinationDeploymentFile(String jndiName) {
+ return System.getProperty("jsfunit.deploy.dir") + "/" +
jndiName + "-service.xml";
+ }
+
+ /**
+ * Create a map of property names to property values for a particular
+ * destination. The desired property names are given by specificProperties.
+ * (This is useful when we need to check the values of some specific properties
+ * only - eg. the configuration tests)
+ */
+ protected Map<String, MetaValue> getSpecificComponentProperties(String
componentName,
+ ComponentType type)
throws Exception {
+ String[] specificProperties = new String[] {"JNDIName",
"clustered",
+ "downCacheSize",
"fullSize",
+ "maxDeliveryAttempts",
"maxSize",
+
"messageCounterHistoryDayLimit", "pageSize",
+ "redeliveryDelay"};
+ return super.getSpecificComponentProperties(componentName, type,
specificProperties);
+ }
+
/*
* CREATION TESTS
*/
/**
- * Create a new queue.
+ * Test Name: testCreateQueue
+ * Assertion: Verify the ability to create a new queue.
+ *
+ * Strategy: Create a queue. Make sure the queue is deployed and that
+ * the properties of the ManagedComponent are set correctly.
*/
public void testCreateQueue() throws Exception {
String jndiName = "CreateQueue";
- String expectedMessage = SUCCESS_MESSAGE + DestinationType.QUEUE.getName();
+ String expectedMessage = ADD_MESSAGE + DestinationType.QUEUE.getName();
createDestinationCommon(DestinationType.QUEUE, QUEUE_DEFAULT_TEMPLATE,
jndiName, expectedMessage, QUEUE_COMPONENT_TYPE);
}
/**
- * Create a new topic.
+ * Test Name: testCreateTopic
+ * Assertion: Verify the ability to create a new topic.
+ *
+ * Strategy: Create a topic. Make sure the topic is deployed and that
+ * the properties of the ManagedComponent are set correctly.
*/
public void testCreateTopic() throws Exception {
String jndiName = "CreateTopic";
- String expectedMessage = SUCCESS_MESSAGE + DestinationType.TOPIC.getName();
+ String expectedMessage = ADD_MESSAGE + DestinationType.TOPIC.getName();
createDestinationCommon(DestinationType.TOPIC, TOPIC_DEFAULT_TEMPLATE,
jndiName, expectedMessage, TOPIC_COMPONENT_TYPE);
@@ -201,30 +224,29 @@
// Check for the appropriate success messages
checkClientAndServerMessages(expectedMessage, expectedMessage, false);
- // Make sure the ManagedComponent was created
- assertNotNull("The returned component was null",
- getManagedComponent(jndiName, componentType));
+ // Make sure the ManagedComponent was created and that the properties are
+ // set correctly
assertTrue("The destination is not deployed ",
isDeployed(jndiName + "-service.xml"));
-
- // Verify that the properties were set correctly
checkComponentProperties(propertiesMap, jndiName, componentType);
// Clean up
deleteDestination(destinationType, jndiName);
}
- /**
- * Attempt to create a new queue but leave a required value unset.
- * Make sure the appropriate error message occurs.
+ /**
+ * Test Name: testCreateQueueMissingRequiredValue
+ * Assertion: Verify the ability to handle a missing required value when
+ * creating a queue. Make sure the appropriate error message occurs.
*/
public void testCreateQueueMissingRequiredValue() throws IOException {
createDestinationMissingRequiredValue(DestinationType.QUEUE,
QUEUE_DEFAULT_TEMPLATE);
}
/**
- * Attempt to create a new topic but leave a required value unset.
- * Make sure the appropriate error message occurs.
+ * Test Name: testCreateTopicMissingRequiredValue
+ * Assertion: Verify the ability to handle a missing required value when
+ * creating a topic. Make sure the appropriate error message occurs.
*/
public void testCreateTopicMissingRequiredValue() throws IOException {
createDestinationMissingRequiredValue(DestinationType.TOPIC,
TOPIC_DEFAULT_TEMPLATE);
@@ -249,9 +271,10 @@
}
/**
- * Attempt to create a new queue but set a property value beyond
- * its expected range of values. Make sure the appropriate error message
- * occurs.
+ * Test Name: testCreateQueuePropertyOutOfRange
+ * Assertion: Verify the ability to handle a property value beyond its
+ * expected range of values when creating a queue. Make sure the appropriate
+ * error message occurs.
*/
public void testCreateQueuePropertyOutOfRange() throws IOException {
createDestinationPropertyOutOfRange(DestinationType.QUEUE,
@@ -260,9 +283,10 @@
}
/**
- * Attempt to create a new topic but set a property value beyond
- * its expected range of values. Make sure the appropriate error message
- * occurs.
+ * Test Name: testCreateTopicPropertyOutOfRange
+ * Assertion: Verify the ability to handle a property value beyond its
+ * expected range of values when creating a topic. Make sure the appropriate
+ * error message occurs.
*/
public void testCreateTopicPropertyOutOfRange() throws IOException {
createDestinationPropertyOutOfRange(DestinationType.TOPIC,
@@ -296,8 +320,10 @@
}
/**
- * Attempt to create a new queue but set a property value to an invalid
- * type. Make sure the appropriate error message occurs.
+ * Test Name: testCreateQueueInvalidPropertyType
+ * Assertion: Verify the ability to handle a property value that has an
+ * invalid type when creating a queue. Make sure the appropriate
+ * error message occurs.
*/
public void testCreateQueueInvalidPropertyType() throws IOException {
createDestinationInvalidPropertyType(DestinationType.QUEUE,
@@ -305,15 +331,17 @@
"InvalidPropertyTypeQueue");
}
- /**
- * Attempt to create a new topic but set a property value to an invalid
- * type. Make sure the appropriate error message occurs.
- */
+ /**
+ * Test Name: testCreateTopicInvalidPropertyType
+ * Assertion: Verify the ability to handle a property value that has an
+ * invalid type when creating a topic. Make sure the appropriate
+ * error message occurs.
+ */
public void testCreateTopicInvalidPropertyType() throws IOException {
createDestinationInvalidPropertyType(DestinationType.TOPIC,
TOPIC_DEFAULT_TEMPLATE,
"InvalidPropertyTypeTopic");
- }
+ }
/**
* Common code for the testCreate*InvalidPropertyType() tests.
@@ -340,8 +368,10 @@
}
/**
- * Attempt to create a new queue using a JNDI name that
- * already exists. Make sure the appropriate error message occurs.
+ * Test Name: testCreateQueueDuplicateJNDIName
+ * Assertion: Verify the ability to handle a duplicate JNDI name
+ * when creating a queue. Make sure the appropriate error message
+ * occurs.
*/
public void testCreateQueueDuplicateJNDIName() throws IOException {
createDestinationDuplicateJNDIName(DestinationType.QUEUE,
QUEUE_DEFAULT_TEMPLATE,
@@ -349,8 +379,10 @@
}
/**
- * Attempt to create a new topic using a JNDI name that
- * already exists. Make sure the appropriate error message occurs.
+ * Test Name: testCreateTopicDuplicateJNDIName
+ * Assertion: Verify the ability to handle a duplicate JNDI name
+ * when creating a queue. Make sure the appropriate error message
+ * occurs.
*/
public void testCreateTopicDuplicateJNDIName() throws IOException {
createDestinationDuplicateJNDIName(DestinationType.TOPIC,
TOPIC_DEFAULT_TEMPLATE,
@@ -374,4 +406,329 @@
String expectedMessage = "A " + destinationType.getName() + "
named '" + jndiName + "' already exists";
checkClientAndServerMessages(expectedMessage, expectedMessage, true);
}
+
+ /*
+ * DELETION TESTS
+ */
+
+ /**
+ * Test Name: testDeleteQueueUsingExistingServiceFile
+ * Assertion: Verify the ability to delete a queue. Use a queue
+ * that already exists.
+ *
+ * Strategy: Delete the queue. Make sure the ManagedComponent is removed.
+ */
+ public void testDeleteQueueUsingExistingServiceFile() throws Exception {
+ String jndiName = "DeleteQueueExistingFile";
+
+ expandNavTreeArrow(JMS_NAV_LABEL);
+ deleteDestinationCommon(jndiName, DestinationType.QUEUE, QUEUE_COMPONENT_TYPE);
+ }
+
+ /**
+ * Test Name: testDeleteQueue
+ * Assertion: Verify the ability to delete a queue.
+ *
+ * Strategy: Create a queue and then delete it. Make sure the ManagedComponent
+ * is removed.
+ */
+ public void testDeleteQueue() throws Exception {
+ String jndiName = "QueueDelete";
+
+ // Create the queue first
+ Map<String, MetaValue> propertiesMap = createQueue(jndiName);
+ deleteDestinationCommon(jndiName, DestinationType.QUEUE, QUEUE_COMPONENT_TYPE);
+ }
+
+ /**
+ * Test Name: testDeleteTopicUsingExistingServiceFile
+ * Assertion: Verify the ability to delete a topic. Use a topic
+ * that already exists.
+ *
+ * Strategy: Delete the topic. Make sure the ManagedComponent is removed.
+ */
+ public void testDeleteTopicUsingExistingServiceFile() throws Exception {
+ String jndiName = "DeleteTopicExistingFile";
+
+ expandNavTreeArrow(JMS_NAV_LABEL);
+ deleteDestinationCommon(jndiName, DestinationType.TOPIC, TOPIC_COMPONENT_TYPE);
+ }
+
+ /**
+ * Test Name: testDeleteTopic
+ * Assertion: Verify the ability to delete a topic.
+ *
+ * Strategy: Create a topic and then delete it. Make sure the ManagedComponent
+ * is removed.
+ */
+ public void testDeleteTopic() throws Exception {
+ String jndiName = "TopicDelete";
+
+ // Create the topic first
+ Map<String, MetaValue> propertiesMap = createTopic(jndiName);
+ deleteDestinationCommon(jndiName, DestinationType.TOPIC, TOPIC_COMPONENT_TYPE);
+ }
+
+ /**
+ * Common code for the testDelete* tests.
+ */
+ public void deleteDestinationCommon(String jndiName,
+ DestinationType destinationType,
+ ComponentType componentType) throws Exception {
+ deleteDestination(destinationType, jndiName);
+
+ // Check for the appropriate success messages
+ String expectedMessage = DELETE_MESSAGE + destinationType.getName() + "
'" + jndiName + "'";
+ checkClientAndServerMessages(expectedMessage, expectedMessage, false);
+
+ // Make sure the ManagedComponent was removed
+ assertNull("The destination was not removed after deletion (the
ManagedComponent is non-null)",
+ getManagedComponent(jndiName, componentType));
+ assertFalse("The entry was not removed from the -service.xml file after
deletion",
+ containsElement(getDestinationDeploymentFile(jndiName),
+ SERVICE_FILE_CHILD_ELEMENT,
+ SERVICE_FILE_ROOT_ELEMENT));
+ }
+
+ /*
+ * CONFIGURATION TESTS
+ */
+
+ /**
+ * Test Name: testConfigureQueueChangePropertiesUsingExistingServiceFile
+ * Assertion: Verify the ability to change queue property values.
+ * Use a queue that already exists.
+ *
+ * Strategy: Change some property values for the queue.
+ * Make sure the properties of the ManagedComponent are updated accordingly.
+ */
+ public void testConfigureQueuePropertiesUsingExistingServiceFile() throws Exception
{
+ String jndiName = "ChangePropertiesExistingQueue";
+ Map<String, MetaValue> propertiesMap =
getSpecificComponentProperties(jndiName, QUEUE_COMPONENT_TYPE);
+
+ // The properties we are going to change
+ // (Before: messageCounterHistoryDayLimit=-1, redeliveryDelay=-1 )
+ Map<String, MetaValue> propertiesMapChanges = new HashMap<String,
MetaValue>();
+ propertiesMapChanges.put("messageCounterHistoryDayLimit",
SimpleValueSupport.wrap(new Integer(0)));
+ propertiesMapChanges.put("redeliveryDelay",
SimpleValueSupport.wrap(new Long(40000)));
+
+ expandNavTreeArrow(JMS_NAV_LABEL);
+
+ changeDestinationProperties(jndiName, DestinationType.QUEUE,
+ QUEUE_COMPONENT_TYPE, propertiesMapChanges,
+ propertiesMap);
+ }
+
+ /**
+ * Test Name: testConfigureTopicChangePropertiesUsingExistingServiceFile
+ * Assertion: Verify the ability to change topic property values.
+ * Use a topic that already exists.
+ *
+ * Strategy: Change some property values for the topic.
+ * Make sure the properties of the ManagedComponent are updated accordingly.
+ */
+ public void testConfigureTopicChangePropertiesUsingExistingServiceFile() throws
Exception {
+ String jndiName = "ChangePropertiesExistingTopic";
+ Map<String, MetaValue> propertiesMap =
getSpecificComponentProperties(jndiName, TOPIC_COMPONENT_TYPE);
+
+ // The properties we are going to change
+ // (Before: maxDeliveryAttempts=-1, redeliveryDelay=-1 )
+ Map<String, MetaValue> propertiesMapChanges = new HashMap<String,
MetaValue>();
+ propertiesMapChanges.put("maxDeliveryAttempts",
SimpleValueSupport.wrap(new Integer(15)));
+ propertiesMapChanges.put("redeliveryDelay",
SimpleValueSupport.wrap(new Long(40000)));
+
+ expandNavTreeArrow(JMS_NAV_LABEL);
+
+ changeDestinationProperties(jndiName, DestinationType.TOPIC,
+ TOPIC_COMPONENT_TYPE, propertiesMapChanges,
+ propertiesMap);
+ }
+
+ /**
+ * Test Name: testConfigureQueueChangeProperties
+ * Assertion: Verify the ability to change queue property values.
+ *
+ * Strategy: Create a new queue. Change some property
+ * values for this queue. Make sure the properties of the ManagedComponent
+ * are updated accordingly.
+ */
+ public void testConfigureQueueChangeProperties() throws Exception {
+ String jndiName = "ChangePropertiesQueue";
+
+ // Create the queue first
+ Map<String, MetaValue> propertiesMap = createQueue(jndiName);
+
+ // The properties we are going to change
+ // (Before: messageCounterHistoryDayLimit=5, redeliveryDelay=-1 )
+ Map<String, MetaValue> propertiesMapChanges = new HashMap<String,
MetaValue>();
+ propertiesMapChanges.put("messageCounterHistoryDayLimit",
SimpleValueSupport.wrap(new Integer(0)));
+ propertiesMapChanges.put("redeliveryDelay",
SimpleValueSupport.wrap(new Long(40000)));
+
+ changeDestinationProperties(jndiName, DestinationType.QUEUE,
+ QUEUE_COMPONENT_TYPE, propertiesMapChanges,
+ propertiesMap);
+ }
+
+ /**
+ * Test Name: testConfigureTopicChangeProperties
+ * Assertion: Verify the ability to change topic property values.
+ *
+ * Strategy: Create a new topic. Change some property
+ * values for this topic. Make sure the properties of the ManagedComponent
+ * are updated accordingly.
+ */
+ public void testConfigureTopicChangeProperties() throws Exception {
+ String jndiName = "ChangePropertiesTopic";
+
+ // Create the topic first
+ Map<String, MetaValue> propertiesMap = createTopic(jndiName);
+
+ // The properties we are going to change
+ // (Before: redeliveryDelay=60000, maxDeliveryAttempts=-1 )
+ Map<String, MetaValue> propertiesMapChanges = new HashMap<String,
MetaValue>();
+ propertiesMapChanges.put("redeliveryDelay",
SimpleValueSupport.wrap(new Long(40000)));
+ propertiesMapChanges.put("maxDeliveryAttempts",
SimpleValueSupport.wrap(new Integer(15)));
+
+ changeDestinationProperties(jndiName, DestinationType.TOPIC,
+ TOPIC_COMPONENT_TYPE, propertiesMapChanges,
+ propertiesMap);
+ }
+
+ /**
+ * Common code for changing a destination's property values.
+ */
+ private void changeDestinationProperties(String jndiName,
+ DestinationType destinationType,
+ ComponentType componentType,
+ Map<String, MetaValue>
propertiesMapChanges,
+ Map<String, MetaValue> propertiesMap)
throws Exception {
+
+ // The success message we should see
+ String expectedMessage = UPDATE_MESSAGE + destinationType.getName() + "
'"
+ + jndiName + "'";
+
+ // Change some property values
+ configureResource(JMS_NAV_LABEL, destinationType.getNavLabel(), jndiName,
+ propertiesMap, propertiesMapChanges, componentType,
+ expectedMessage);
+
+ assertTrue("The destination is not deployed ",
+ isDeployed(jndiName + "-service.xml"));
+
+ // Clean up
+ deleteDestination(destinationType, jndiName);
+ }
+
+ /**
+ * Test Name: testConfigureQueueUnsetPropertiesUsingExistingServiceFile
+ * Assertion: Verify the ability to unset queue property values. Use a
+ * queue that already exists.
+ *
+ * Strategy: Unset some property values for the queue. Make sure the
+ * rest of the properties for the ManagedComponent remain unchanged.
+ */
+ public void testConfigureQueueUnsetPropertiesUsingExistingServiceFile() throws
Exception {
+ String jndiName = "UnsetPropertiesExistingQueue";
+ unsetPropertiesUsingExistingServiceFile(jndiName, DestinationType.QUEUE,
+ QUEUE_COMPONENT_TYPE);
+ }
+
+ /**
+ * Test Name: testConfigureTopicUnsetPropertiesUsingExistingServiceFile
+ * Assertion: Verify the ability to unset topic property values. Use a
+ * topic that already exists.
+ *
+ * Strategy: Unset some property values for the topic. Make sure the
+ * rest of the properties for the ManagedComponent remain unchanged.
+ */
+ public void testConfigureTopicUnsetPropertiesUsingExistingServiceFile() throws
Exception {
+ String jndiName = "UnsetPropertiesExistingTopic";
+ unsetPropertiesUsingExistingServiceFile(jndiName, DestinationType.TOPIC,
+ TOPIC_COMPONENT_TYPE);
+ }
+
+ /**
+ * Common code for the testConfigure*UnsetPropertiesUsingExistingServiceFile
+ * tests.
+ */
+ private void unsetPropertiesUsingExistingServiceFile(String jndiName,
+ DestinationType
destinationType,
+ ComponentType componentType)
throws Exception {
+ Map<String, MetaValue> propertiesMap =
getSpecificComponentProperties(jndiName,
+
componentType);
+
+ String[] propertiesToUnset = new String[] { "maxDeliveryAttempts",
"messageCounterHistoryDayLimit" };
+ propertiesMap.remove("maxDeliveryAttempts");
+ propertiesMap.remove("messageCounterHistoryDayLimit");
+
+ expandNavTreeArrow(JMS_NAV_LABEL);
+ unsetDestinationProperties(destinationType, jndiName, propertiesMap,
+ propertiesToUnset, componentType);
+ }
+
+ /**
+ * Test Name: testConfigureQueueUnsetProperties
+ * Assertion: Verify the ability to unset queue property values.
+ *
+ * Strategy: Create a new queue. Unset some property values for the
+ * queue. Make sure the rest of the properties for the ManagedComponent
+ * remain unchanged.
+ */
+ public void testConfigureQueueUnsetProperties() throws Exception {
+ String jndiName = "UnsetPropertiesQueue";
+
+ // Create the queue first
+ Map<String, MetaValue> propertiesMap = createQueue(jndiName);
+
+ String[] propertiesToUnset = new String[] { "maxSize" };
+ propertiesMap.remove("maxSize");
+
+ unsetDestinationProperties(DestinationType.QUEUE, jndiName, propertiesMap,
+ propertiesToUnset, QUEUE_COMPONENT_TYPE);
+ }
+
+ /**
+ * Test Name: testConfigureTopicUnsetProperties
+ * Assertion: Verify the ability to unset topic property values.
+ *
+ * Strategy: Create a new topic. Unset some property values for the
+ * topic. Make sure the rest of the properties for the ManagedComponent
+ * remain unchanged.
+ */
+ public void testConfigureTopicUnsetProperties() throws Exception {
+ String jndiName = "UnsetPropertiesTopic";
+
+ // Create the topic first
+ Map<String, MetaValue> propertiesMap = createTopic(jndiName);
+
+ String[] propertiesToUnset = new String[] { "maxSize" };
+ propertiesMap.remove("maxSize");
+
+ unsetDestinationProperties(DestinationType.TOPIC, jndiName, propertiesMap,
+ propertiesToUnset, TOPIC_COMPONENT_TYPE);
+ }
+
+ /**
+ * Common code for the testConfigure*UnsetProperties* tests.
+ */
+ private void unsetDestinationProperties(DestinationType destinationType,
+ String jndiName,
+ Map<String, MetaValue> propertiesMap,
+ String[] propertiesToUnset,
+ ComponentType componentType) throws
Exception {
+
+ // The success message we should see
+ String expectedMessage = UPDATE_MESSAGE + destinationType.getName() + "
'"
+ + jndiName + "'";
+
+ unsetResourceProperties(JMS_NAV_LABEL, destinationType.getNavLabel(),
+ jndiName, propertiesMap, propertiesToUnset,
+ componentType, expectedMessage);
+
+ assertTrue("The destination is not deployed ",
+ isDeployed(jndiName + "-service.xml"));
+
+ // Clean up
+ deleteDestination(destinationType, jndiName);
+ }
}
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/ResourceTestBase.java
===================================================================
---
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/ResourceTestBase.java 2009-02-27
09:14:01 UTC (rev 173)
+++
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/ResourceTestBase.java 2009-02-27
18:01:00 UTC (rev 174)
@@ -28,9 +28,15 @@
import org.jboss.jopr.jsfunit.*;
import java.util.Map;
import org.jboss.metatype.api.values.MetaValue;
+import org.jdom.Document;
+import org.jdom.Element;
+import org.jdom.input.SAXBuilder;
+import java.io.File;
+import org.jboss.managed.api.ComponentType;
+import org.jboss.jopr.jsfunit.exceptions.EmbJoprTestException;
/**
- * This class contains basic methods for creating and deleting
+ * This class contains basic methods for creating, configuring, and deleting
* resources (eg. Topics, Queues, etc.).
*
* @author Farah Juma
@@ -47,9 +53,10 @@
public static final String OUT_OF_RANGE_MESSAGE="Specified attribute is not
between the expected values";
public static final String INVALID_INTEGER_MESSAGE="Value is not a valid
integer";
- // Success message
- public static final String SUCCESS_MESSAGE = "Successfully added new ";
+ // Success messages
+ public static final String ADD_MESSAGE = "Successfully added new ";
public static final String DELETE_MESSAGE = "Successfully deleted ";
+ public static final String UPDATE_MESSAGE = "Successfully updated ";
/**
* Create a new resource using the given type, template, and properties.
@@ -60,9 +67,9 @@
* "Queues", "Topics", etc").
*
*/
- public void createResource(String resourceType,
- String resourceTemplate,
- Map<String, MetaValue> propertiesMap) throws
IOException {
+ protected void createResource(String resourceType,
+ String resourceTemplate,
+ Map<String, MetaValue> propertiesMap) throws
IOException {
HtmlAnchor resourceLink = getNavTreeLink(resourceType);
resourceLink.click();
@@ -73,22 +80,89 @@
client.click("resourceCreateForm:addButton");
// Configure the properties associated with this resource
+ setResourceProperties(propertiesMap);
+ }
+
+ /**
+ * Set the properties associated with this resource.
+ */
+ protected void setResourceProperties(Map<String, MetaValue> propertiesMap) {
Map<String, String> formattedPropertiesMap =
formatPropertiesMap(propertiesMap);
fillOutForm(formattedPropertiesMap);
}
/**
+ * Configure the properties associated with this resource
+ * and verify that the properties were updated appropriately.
+ *
+ * Assumes the resource tree node (eg. "JMS Destinations",
"Datasources",
+ * etc.) is already expanded.
+ */
+ protected void configureResource(String resourceCategory,
+ String resourceSubCategory,
+ String resourceName,
+ Map<String, MetaValue> propertiesMap,
+ Map<String, MetaValue> propertiesMapChanges,
+ ComponentType componentType,
+ String expectedMessage) throws Exception {
+
+ // Navigate to the configuration page for the resource
+ navigateToPage(resourceCategory, resourceSubCategory,
+ resourceName, CONFIGURATION_TAB);
+
+ setResourceProperties(propertiesMapChanges);
+ client.click("resourceConfigurationForm:saveButton");
+
+ checkClientAndServerMessages(expectedMessage, expectedMessage, false);
+
+ // Verify that the properties were set correctly
+ propertiesMap.putAll(propertiesMapChanges);
+ checkComponentProperties(propertiesMap, resourceName, componentType);
+ }
+
+ /**
+ * Unset the specified properties for the given resource.
+ *
+ * @param propertiesMap is a map of property names to expected property values
+ */
+ protected void unsetResourceProperties(String resourceCategory,
+ String resourceSubCategory,
+ String resourceName,
+ Map<String, MetaValue> propertiesMap,
+ String[] propertiesToUnset,
+ ComponentType componentType,
+ String expectedMessage) throws Exception {
+
+ // Navigate to the configuration page for the resource
+ navigateToPage(resourceCategory, resourceSubCategory,
+ resourceName, CONFIGURATION_TAB);
+
+ // Unset the given properties
+ for(int i = 0; i < propertiesToUnset.length; i++) {
+ String propertyName = propertiesToUnset[i];
+ enableOrDisableFormInput(propertyName, Boolean.FALSE);
+ }
+
+ client.click("resourceConfigurationForm:saveButton");
+
+ checkClientAndServerMessages(expectedMessage, expectedMessage, false);
+
+ // Make sure the rest of the properties remained unchanged
+ checkComponentProperties(propertiesMap, resourceName, componentType);
+ }
+
+ /**
* Delete the given resource.
*
* @param resourceFormName The name of the form that contains the delete button.
*/
- public void deleteResource(String resourceFormName, String resourceName) throws
IOException {
+ protected void deleteResource(String resourceFormName, String resourceName) throws
IOException {
HtmlSelect menu = (HtmlSelect)client.getElement("currentPageSize");
if(menu != null) {
menu.setSelectedAttribute(MAX_ITEMS_PER_PAGE, Boolean.TRUE);
}
-
+
HtmlButtonInput deleteButton;
try {
deleteButton = getDeleteButton(resourceFormName, resourceName);
@@ -101,4 +175,48 @@
deleteButton.click();
}
}
+
+ /**
+ * containsElement returns whether or not the given deployment contains
+ * the given element.
+ *
+ * @param fileName is the full path to the deployment
+ * @param elementName is the element we are looking for
+ */
+ protected boolean containsElement(String fileName, String elementName,
+ String expectedRootElement) {
+ try {
+ File file = new File(fileName);
+ SAXBuilder builder = new SAXBuilder();
+ Document doc = builder.build(file);
+
+ Element root = doc.getRootElement();
+ assertTrue(root.getName().equals(expectedRootElement));
+ return root.getChild(elementName) != null;
+ } catch(Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Navigate to the given tab (eg. "configurationTab",
"controlTab") for
+ * the given resource.
+ *
+ * navigateToPage() assumes that the resource tree node (eg. "JMS
Destinations",
+ * "Datasources", etc.) is already expanded when this method is called.
+ */
+ protected void navigateToPage(String resourceCategory,
+ String resourceSubCategory,
+ String resourceName,
+ String tabName) throws IOException,
EmbJoprTestException {
+ refreshTreeNode(resourceCategory);
+ ClickableElement datasourceTypeArrow = getNavTreeArrow(resourceSubCategory);
+ datasourceTypeArrow.click();
+
+ HtmlAnchor datasource = getNavTreeLink(resourceName);
+ datasource.click();
+
+ HtmlAnchor tabLink = (HtmlAnchor)client.getElement(tabName);
+ tabLink.click();
+ }
}
Added: trunk/jsfunit/testdata/destinations/ChangePropertiesExistingQueue-service.xml
===================================================================
--- trunk/jsfunit/testdata/destinations/ChangePropertiesExistingQueue-service.xml
(rev 0)
+++
trunk/jsfunit/testdata/destinations/ChangePropertiesExistingQueue-service.xml 2009-02-27
18:01:00 UTC (rev 174)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<server>
+ <mbean xmbean-dd="xmdesc/Queue-xmbean.xml"
name="jboss.messaging.destination:service=Queue,name=ChangePropertiesExistingQueue"
code="org.jboss.jms.server.destination.QueueService">
+
<annotation>(a)org.jboss.system.deployers.managed.ManagementObjectClass(code=org.jboss.jms.server.destination.QueueServiceMO)</annotation>
+ <attribute
name="JNDIName">ChangePropertiesExistingQueue</attribute>
+ <depends
optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+</server>
Added: trunk/jsfunit/testdata/destinations/ChangePropertiesExistingTopic-service.xml
===================================================================
--- trunk/jsfunit/testdata/destinations/ChangePropertiesExistingTopic-service.xml
(rev 0)
+++
trunk/jsfunit/testdata/destinations/ChangePropertiesExistingTopic-service.xml 2009-02-27
18:01:00 UTC (rev 174)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<server>
+ <mbean xmbean-dd="xmdesc/Topic-xmbean.xml"
name="jboss.messaging.destination:service=Topic,name=ChangePropertiesExistingTopic"
code="org.jboss.jms.server.destination.TopicService">
+
<annotation>(a)org.jboss.system.deployers.managed.ManagementObjectClass(code=org.jboss.jms.server.destination.TopicServiceMO)</annotation>
+ <attribute
name="JNDIName">ChangePropertiesExistingTopic</attribute>
+ <depends
optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+</server>
Added: trunk/jsfunit/testdata/destinations/DeleteQueueExistingFile-service.xml
===================================================================
--- trunk/jsfunit/testdata/destinations/DeleteQueueExistingFile-service.xml
(rev 0)
+++ trunk/jsfunit/testdata/destinations/DeleteQueueExistingFile-service.xml 2009-02-27
18:01:00 UTC (rev 174)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<server>
+ <mbean xmbean-dd="xmdesc/Queue-xmbean.xml"
name="jboss.messaging.destination:service=Queue,name=DeleteQueueExistingFile"
code="org.jboss.jms.server.destination.QueueService">
+
<annotation>(a)org.jboss.system.deployers.managed.ManagementObjectClass(code=org.jboss.jms.server.destination.QueueServiceMO)</annotation>
+ <attribute
name="JNDIName">DeleteQueueExistingFile</attribute>
+ <depends
optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+</server>
Added: trunk/jsfunit/testdata/destinations/DeleteTopicExistingFile-service.xml
===================================================================
--- trunk/jsfunit/testdata/destinations/DeleteTopicExistingFile-service.xml
(rev 0)
+++ trunk/jsfunit/testdata/destinations/DeleteTopicExistingFile-service.xml 2009-02-27
18:01:00 UTC (rev 174)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<server>
+ <mbean xmbean-dd="xmdesc/Topic-xmbean.xml"
name="jboss.messaging.destination:service=Topic,name=DeleteTopicExistingFile"
code="org.jboss.jms.server.destination.TopicService">
+
<annotation>(a)org.jboss.system.deployers.managed.ManagementObjectClass(code=org.jboss.jms.server.destination.TopicServiceMO)</annotation>
+ <attribute
name="JNDIName">DeleteTopicExistingFile</attribute>
+ <depends
optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+</server>
Added: trunk/jsfunit/testdata/destinations/UnsetPropertiesExistingQueue-service.xml
===================================================================
--- trunk/jsfunit/testdata/destinations/UnsetPropertiesExistingQueue-service.xml
(rev 0)
+++
trunk/jsfunit/testdata/destinations/UnsetPropertiesExistingQueue-service.xml 2009-02-27
18:01:00 UTC (rev 174)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<server>
+ <mbean xmbean-dd="xmdesc/Queue-xmbean.xml"
name="jboss.messaging.destination:service=Queue,name=UnsetPropertiesExistingQueue"
code="org.jboss.jms.server.destination.QueueService">
+
<annotation>(a)org.jboss.system.deployers.managed.ManagementObjectClass(code=org.jboss.jms.server.destination.QueueServiceMO)</annotation>
+ <attribute
name="JNDIName">UnsetPropertiesExistingQueue</attribute>
+ <depends
optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+</server>
Added: trunk/jsfunit/testdata/destinations/UnsetPropertiesExistingTopic-service.xml
===================================================================
--- trunk/jsfunit/testdata/destinations/UnsetPropertiesExistingTopic-service.xml
(rev 0)
+++
trunk/jsfunit/testdata/destinations/UnsetPropertiesExistingTopic-service.xml 2009-02-27
18:01:00 UTC (rev 174)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<server>
+ <mbean xmbean-dd="xmdesc/Topic-xmbean.xml"
name="jboss.messaging.destination:service=Topic,name=UnsetPropertiesExistingTopic"
code="org.jboss.jms.server.destination.TopicService">
+
<annotation>(a)org.jboss.system.deployers.managed.ManagementObjectClass(code=org.jboss.jms.server.destination.TopicServiceMO)</annotation>
+ <attribute
name="JNDIName">UnsetPropertiesExistingTopic</attribute>
+ <depends
optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+</server>