EMBJOPR SVN: r174 - in trunk: jsfunit/src/test/java/org/jboss/jopr/jsfunit and 2 other directories.
by embjopr-commits@lists.jboss.org
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>@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>@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>@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>@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>@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>@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>
15 years, 10 months
EMBJOPR SVN: r173 - trunk/jsfunit/testdata/jboss-configuration/conf.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-02-27 04:14:01 -0500 (Fri, 27 Feb 2009)
New Revision: 173
Modified:
trunk/jsfunit/testdata/jboss-configuration/conf/jboss-log4j.xml
Log:
Limited logging of http data and html/js snippets.
Modified: trunk/jsfunit/testdata/jboss-configuration/conf/jboss-log4j.xml
===================================================================
--- trunk/jsfunit/testdata/jboss-configuration/conf/jboss-log4j.xml 2009-02-27 06:52:31 UTC (rev 172)
+++ trunk/jsfunit/testdata/jboss-configuration/conf/jboss-log4j.xml 2009-02-27 09:14:01 UTC (rev 173)
@@ -192,6 +192,18 @@
<category name="org.ajax4jsf">
<priority value="WARN"/>
</category>
+ <category name="httpclient.wire">
+ <priority value="INFO"/>
+ </category>
+ <category name="facelets">
+ <priority value="INFO"/>
+ </category>
+ <category name="com.gargoylesoftware.htmlunit.javascript.host">
+ <priority value="INFO"/>
+ </category>
+ <category name="com.gargoylesoftware.htmlunit.html.HtmlScript">
+ <priority value="INFO"/>
+ </category>
15 years, 10 months
EMBJOPR SVN: r172 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-02-27 01:52:31 -0500 (Fri, 27 Feb 2009)
New Revision: 172
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DebugUtils.java
Log:
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DebugUtils.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DebugUtils.java 2009-02-27 06:51:59 UTC (rev 171)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DebugUtils.java 2009-02-27 06:52:31 UTC (rev 172)
@@ -34,6 +34,9 @@
public static void writeFile( String sFilePath, String content ) throws FileNotFoundException, IOException{
+ // TODO: Do this better... Maven surely provides target path.
+ //sFilePath = "target/"+sFilePath;
+
new FileWriter(sFilePath).write(content);
}
15 years, 10 months
EMBJOPR SVN: r171 - in trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit: as5 and 1 other directory.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-02-27 01:51:59 -0500 (Fri, 27 Feb 2009)
New Revision: 171
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/ApplicationTestBaseAS5.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/EarTest.java
Log:
Several EAR tests added.
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java 2009-02-27 02:04:19 UTC (rev 170)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java 2009-02-27 06:51:59 UTC (rev 171)
@@ -23,6 +23,34 @@
package org.jboss.jopr.jsfunit;
public interface AppConstants {
+
+ public static final String SYSPROP_DEPLOY_DIR = "jsfunit.deploy.dir";
+ public static final String SYSPROP_TESTDATA_DIR = "jsfunit.testdata";
+
+
+ public enum DeployableTypes {
+
+ EAR(AppConstants.NAV_EAR),
+ WAR(AppConstants.NAV_WAR),
+ EJB(AppConstants.NAV_EJB),
+ SAR(AppConstants.NAV_SAR),
+ RAR(AppConstants.NAV_RAR),
+ MC_BEAN(AppConstants.NAV_MC);
+
+ protected final String navTreeLabel;
+ public String getNavTreeLabel() { return navTreeLabel; }
+
+ DeployableTypes( String navTreeLabel ){
+ this.navTreeLabel = navTreeLabel;
+ }
+
+ }
+
+ public enum DeploymentMeans {
+ VIA_EMBJOPR,
+ VIA_FILESYSTEM,
+ VIA_JMX
+ }
// Navigation
public static final String NAV_EJB = "EJB Application (EJB JAR)s";
@@ -38,13 +66,19 @@
// Test Archives
public static final String BASIC_JAR = "deployment-ejb.jar";
public static final String BASIC_EAR = "eardeployment.ear";
+ public static final String EAR_UNPACKED = "unpacked-ear1.ear";
+ public static final String EAR_UNPACKED_ZIP = "unpacked-ear1.ear.zip";
public static final String BASIC_WAR = "hellothere.war";
// Defaults
- public static final String[] WAR_DEFAULTS = new String[]{"ROOT.war", "invoker.war",
+ public static final String[] WAR_DEFAULTS = new String[]{
+ "ROOT.war", "invoker.war",
"jbas5-admin-console.war", "jbossws-management.war",
- "jmx-console.war", "web-console.war"};
- public static final String[] SAR_DEFAULTS = new String[]{"cache-invalidation-service.xml",
+ "jmx-console.war", "web-console.war"
+ };
+
+ public static final String[] SAR_DEFAULTS = new String[]{
+ "cache-invalidation-service.xml",
"connection-factories-service.xml", "console-mgr.sar",
"destinations-service.xml", "ejb2-timer-service.xml",
"hsqldb-ds.xml", "hsqldb-persistence-service.xml",
@@ -54,5 +88,7 @@
"mail-service.xml", "messaging-service.xml", "monitoring-service.xml",
"properties-service.xml", "remoting-bisocket-service.xml",
"schedule-manager-service.xml", "scheduler-service.xml",
- "sqlexception-service.xml", "transaction-service.xml", "uuid-key-generator.sar"};
+ "sqlexception-service.xml", "transaction-service.xml", "uuid-key-generator.sar"
+ };
+
}
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/ApplicationTestBaseAS5.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/ApplicationTestBaseAS5.java 2009-02-27 02:04:19 UTC (rev 170)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/ApplicationTestBaseAS5.java 2009-02-27 06:51:59 UTC (rev 171)
@@ -35,6 +35,9 @@
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
+import java.util.Properties;
+import org.apache.commons.lang.StringUtils;
+import org.w3c.dom.Element;
@@ -47,13 +50,16 @@
public abstract class ApplicationTestBaseAS5 extends EmbjoprTestCase
implements AppConstants {
- //protected String label = null;
- //protected final String serviceName = null;
- //protected final String xmlElementName = null;
- //protected final String templateHtmlSelectValue = null;
+ public ApplicationTestBaseAS5() {
+ super();
+ }
+ public ApplicationTestBaseAS5(String theName) {
+ //super(theName);
+ }
+
public HtmlButtonInput getAppDeleteButton(String resourceName)
{
return getDeleteButton("resourceSummaryForm", resourceName);
@@ -155,9 +161,6 @@
}
- public void announceCurrentTest(){
- log.info( " -------- Test: "+DebugUtils.getCurrentMethodFullName()+" -------- ");
- }
@@ -232,7 +235,10 @@
// A table which has an anchor containing given text.
// Note: Different node types have different id endings - typeSummaryLink, categorySummaryLink, ...
- String xPath = ".//table[.//td[contains(@id,':text')]//a[contains(@id,'SummaryLink') and normalize-space() = '"+label+"']]";
+ //String xPath = ".//table[.//td[contains(@id,':text')]//a[contains(@id,'SummaryLink') and normalize-space() = '"+label+"']]";
+ // Node has @id = navTreeForm:navTree:136:137:138:139:143:195::instanceNodeOrLeafLink
+ // Let's rely on the ":text" id part only and suppose there will be just one link in that TD.
+ String xPath = ".//table[.//td[contains(@id,':text')]//a[normalize-space() = '"+label+"']]";
HtmlTable nodeTable = navTreeForm.getFirstByXPath( xPath );
@@ -446,7 +452,7 @@
/**
* Inner class for manipulation with tab content box.
*/
- protected class TabContentBox extends PageContextAwareElement {
+ protected class TabContentBox extends PageAware {
private HtmlElement element;
public HtmlElement getElement() { return element; }
@@ -500,18 +506,50 @@
/**
- * Row of a content table.
* Contains convenience methods for accessing content tables in EmbJopr.
*/
protected class ContentTable {
+ public static final String ID_CATEGORY_DATA_TABLE = "categorySummaryForm:dataTable";
+ public static final String ID_RESOURCE_DATA_TABLE = "resourceSummaryForm:dataTable";
+
private HtmlTable element;
public HtmlTable getElement() { return element; }
- public ContentTable( HtmlTable element) {
+ /**
+ * Creates a data table wrapper for the given table element.
+ */
+ public ContentTable( HtmlTable element ) {
this.element = element;
}
+ /**
+ * Creates a data table wrapper for first found element with one of these IDs:
+ * ID_CATEGORY_DATA_TABLE, ID_RESOURCE_DATA_TABLE
+ *
+ * This method assumes there's only one "data table" per page.
+ * If not, it simply returns the first in the order of IDs searched.
+ * You can always specify the element using ContentTable( HtmlTable element ).
+ */
+ public ContentTable() throws HtmlElementNotFoundException {
+
+ // Find the data table - try some known IDs.
+ String[] elemIDs = { ID_CATEGORY_DATA_TABLE, ID_RESOURCE_DATA_TABLE };
+ Element elem = null;
+ for( String elemID : elemIDs ){
+ elem = client.getElement(elemID);
+ if( null != elem )
+ break;
+ }
+ if( null == elem )
+ throw new HtmlElementNotFoundException(
+ "Can't find the content table element, searched IDs: "
+ + elemIDs.toString() );
+
+ this.element = (HtmlTable)elem;
+ }
+
+
// Columns maps
private List<String> colLabels = null;
private Map<String, Integer> colIndexes = null;
@@ -541,16 +579,40 @@
return new ContentTableRow(elm, this);
}
+
+
+ /**
+ * Returns wrapper of the table row which contains a link with given label,
+ * or null when the no such row is found.
+ */
+ public ContentTableRow findFirstRowContainingLink( String linkLabel )
+ {
+ if( 0 == element.getRowCount() )
+ return null;
+
+ String xPath = ".//tr[.//a[normalize-space()='"+linkLabel+"']]";
+ HtmlTableRow elm = (HtmlTableRow) element.getFirstByXPath(xPath);
+ if( null == elm )
+ return null;
+ return new ContentTableRow(elm, this);
+ }
+
+ /**
+ * Returns wrapper of the table row which contains a link with given label.
+ * @throws org.jboss.jopr.jsfunit.exceptions.HtmlElementNotFoundException
+ * when no row with such label found.
+ */
public ContentTableRow getFirstRowContainingLink( String linkLabel )
throws HtmlElementNotFoundException
{
if( 0 == element.getRowCount() )
throw new HtmlElementNotFoundException("Table has no rows.");
- String xPath = ".//tr[//a[normalize-space()='"+linkLabel+"']]";
+ String xPath = ".//tr[.//a[normalize-space()='"+linkLabel+"']]";
HtmlTableRow elm = (HtmlTableRow) element.getFirstByXPath(xPath);
if( null == elm )
- throw new HtmlElementNotFoundException(xPath);
+ throw new HtmlElementNotFoundException(
+ "Can't find row containing link '"+linkLabel+"' using XPath: "+xPath);
return new ContentTableRow(elm, this);
}
@@ -615,7 +677,40 @@
+
+
/**
+ * Provides extra method that parses text-like info table (with one column).
+ */
+ protected class ContentInfoTable extends ContentTable {
+
+ public ContentInfoTable(HtmlTable element) {
+ super(element);
+ }
+
+ /**
+ * Parses the content of the table for properties.
+ * @return
+ */
+ public Properties getProperties()
+ {
+ Properties props = new Properties();
+
+ // The template has label in span/strong and the value as text in td.
+ String xPath = ".//tr/td[span/strong]";
+ List<HtmlTableCell> cells = (List<HtmlTableCell>) this.getElement().getByXPath(xPath);
+ for( HtmlTableCell cell : cells ){
+ String[] parts = cell.getTextContent().split(":");
+ props.put(parts[0], parts[1]);
+ }
+ return props;
+ }
+
+ }// inner class ContentInfoTable
+
+
+
+ /**
* Row of a content table.
* Contains convenience methods for accessing content table rows in EmbJopr.
*/
@@ -681,8 +776,16 @@
public HtmlAnchor getLinkByLabel(String linkLabel) throws HtmlElementNotFoundException {
String xPath = ".//a[normalize-space()='"+linkLabel+"']";
HtmlAnchor link = (HtmlAnchor) this.element.getFirstByXPath(xPath);
- if( null == link )
- throw new HtmlElementNotFoundException(xPath);
+ if( null == link ){
+ StringBuilder sb = new StringBuilder();
+ List<HtmlElement> linksFound = this.element.getHtmlElementsByTagName("a");
+ for( HtmlElement linkFound : linksFound ){
+ sb.append("'").append( ((HtmlAnchor)linkFound).getTextContent() ).append("', ");
+ }
+ String availLinks = StringUtils.removeEnd( sb.toString(), ", " );
+
+ throw new HtmlElementNotFoundException("Can't find link using '"+xPath+"', available: "+availLinks);
+ }
return link;
}
@@ -724,6 +827,7 @@
/**
* Pagination control
+ * Not tested yet.
*/
protected class ContentBoxPagination {
@@ -796,6 +900,7 @@
pageSizeSelect.getOptionByValue(optionValue);
}
catch( ElementNotFoundException ex ){
+ // Print out available options.
StringBuilder sb = new StringBuilder(pageSizeSelect.getOptionSize());
for( HtmlOption opt : pageSizeSelect.getOptions() ){
sb.append(" ").append(opt.getValueAttribute());
@@ -808,10 +913,46 @@
pageSizeSelect.setSelectedAttribute(optionValue, true);
}
+ }// ContentBoxPagination
+
+
+
+
+
+
+ // TODO
+ protected class JMXDeploymentInfo {
+
+ // Etc...
+ public boolean isDeployed(){
+ return false;
+ }
+
}
+ // TODO
+ protected class FileDeploymentInfo {
+ // Etc...
+ public boolean isDeployed(){
+ return false;
+ }
+ }
+
+ // TODO
+ protected class EmbJoprDeploymentInfo {
+
+ // Etc...
+ public boolean isDeployed(){
+ return false;
+ }
+
+ }
+
+
+
+
}// ApplicationTestBaseAS5
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/EarTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/EarTest.java 2009-02-27 02:04:19 UTC (rev 170)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/EarTest.java 2009-02-27 06:51:59 UTC (rev 171)
@@ -22,11 +22,29 @@
package org.jboss.jopr.jsfunit.as5;
+import java.io.FileNotFoundException;
+import java.util.Properties;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import java.util.zip.ZipEntry;
import org.jboss.jopr.jsfunit.*;
import com.gargoylesoftware.htmlunit.html.*;
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.zip.ZipInputStream;
+import javax.faces.application.FacesMessage;
+import javax.faces.application.FacesMessage.Severity;
import junit.framework.Test;
+import junit.framework.TestCase;
import junit.framework.TestSuite;
+import org.apache.commons.lang.StringUtils;
+import org.jboss.jopr.jsfunit.AppConstants.DeployableTypes;
import org.jboss.jopr.jsfunit.exceptions.ActionNotAvailableException;
import org.jboss.jopr.jsfunit.exceptions.ActionOutOfSyncException;
import org.jboss.jopr.jsfunit.exceptions.EmbJoprTestException;
@@ -50,10 +68,29 @@
public static Test suite()
{
- return new TestSuite(EarTest.class);
+ String testToRun = System.getProperty("jsfunit.test.single");
+ if( null == testToRun ){
+ return new TestSuite(EarTest.class);
+ }
+ else{
+ // TODO: Try running single test set in system property.
+ // http://members.pingnet.ch/gamma/junit.htm
+ TestSuite suite = new TestSuite();
+ //suite.addTest(this.getClass().getConstructor(String.class).newInstance(testToRun));
+ suite.addTest( new EarTest(testToRun) );
+ return suite;
+ }
}
+ public EarTest() {
+ }
+ private EarTest(String testToRun) {
+ super(testToRun);
+ }
+
+
+
/*
* testName: testBasicEarDeployment
* assertion: verify basic deployment of Enterprise Archive
@@ -61,23 +98,25 @@
* Add a new resource. Verify the resource was successfully
* deployed. Undeploy the archive for test clean up purposes.
*
+ * FAILED: JMX doesn't report EAR as deployed: eardeployment.ear
*/
public void testBasicEarDeployment() throws IOException, EmbJoprTestException
{
- String earFilePath = System.getProperty("jsfunit.testdata") + "/ear/"+BASIC_EAR;
+ // Deploy the EAR.
+ String earFilePath = System.getProperty(SYSPROP_TESTDATA_DIR) + "/ear/"+BASIC_EAR;
deployEar( earFilePath );
String expectedMessage = BASIC_EAR + " created successfully";
checkClientAndServerMessages(expectedMessage, expectedMessage, false);
- // Use JMX to assert that the EAR components really did deploy successfully
- assertTrue("JMX doesn't report EAR as exposed: eardeployment.ear", isEarDeployed(BASIC_EAR));
- assertTrue("JMX doesn't report EJB sessiona.jar as exposed.", isEJBDeployed("sessiona.jar"));
- assertTrue("JMX doesn't report EJB sessionb.jar as exposed.", isEJBDeployed("sessionb.jar"));
+ // Use JMX to assert that the EAR components really did deploy successfully.
+ assertTrue("JMX doesn't report EAR as deployed: eardeployment.ear", isEarDeployed(BASIC_EAR));
+ assertTrue("JMX doesn't report EJB sessiona.jar as deployed.", isEJBDeployed("sessiona.jar"));
+ assertTrue("JMX doesn't report EJB sessionb.jar as deployed.", isEJBDeployed("sessionb.jar"));
- // Undeploy the EAR
+ // Undeploy the EAR.
undeployEar( BASIC_EAR );
expectedMessage = "Successfully deleted Enterprise Application (EAR) '"+BASIC_EAR+"'.";
@@ -106,9 +145,9 @@
verify the archive has been deployed successfully.
*/
- public void testBadEarRedeploy() throws IOException {
+ public void DISABLEDtestBadEarRedeploy() throws IOException {
- String earFilePath = System.getProperty("jsfunit.testdata") + "/ear/"+EAR_MALFORMED_APP_FILENAME;
+ String earFilePath = System.getProperty(SYSPROP_TESTDATA_DIR) + "/ear/"+EAR_MALFORMED_APP_FILENAME;
deployEar(earFilePath);
checkClientAndServerMessages("Failed to create Resource", "Failed to create Resource", true);
@@ -116,6 +155,8 @@
}
+
+
/**
* assertion:
@@ -126,17 +167,15 @@
From the root of the navigation tree:
Click JBossAS Servers ==> JBoss App Server:${config}
==> Applications ==> Enterprise Application
-
- * @param earFilePath
- * @throws java.io.IOException
+
+ * PASSED.
*/
- public void testNavigationToEar() throws IOException, HtmlElementNotFoundException, ActionOutOfSyncException, ActionNotAvailableException
+ public void testNavigationToEar() throws IOException, HtmlElementNotFoundException, ActionOutOfSyncException, ActionNotAvailableException, EmbJoprTestException, InterruptedException
{
- announceCurrentTest();
+ // JBossAS Servers node
NavTreeNode nodeServers = navTree.getNodeByLabel("JBossAS Servers");
nodeServers.click();
- // --- click ---
{
String headerText = "JBossAS Server";
@@ -159,8 +198,8 @@
((HtmlAnchor)firstLink).click();
}
- // --- click ---
+ // JBoss App Server:${config} node
{
String pageText = client.getPageAsText();
@@ -177,9 +216,9 @@
navTree.getNodeByLabel("Applications").click();
}
- // --- click ---
+ // Applications node
{
// Whooo-hooo! So much to click through!
@@ -198,45 +237,518 @@
HtmlAnchor link = row.getFirstLinkFromColumn("Name");
link.click();
}
- // --- click ---
{
// Go back to applications Sumary screen.
navTree.getNodeByLabel("Applications").click();
}
- // --- click ---
+ // Concrete appliction node.
{
+ // Deploy the EAR.
+ String earFilePath = System.getProperty(SYSPROP_TESTDATA_DIR) + "/ear/"+BASIC_EAR;
+ deployEar( earFilePath );
+
navTree.getNodeByLabel(NAV_EAR).click();
- }
- // --- click ---
+ ContentTableRow earRow = new ContentTable().getFirstRowContainingLink(BASIC_EAR);
+ assertTrue("Page doesn't list "+BASIC_EAR+" in Summary tab.", earRow != null );
+ // Go to the summary through listed item.
+ earRow.getLinkByLabel(BASIC_EAR).click();
+ // Check that we have the summary tab for the selected EAR.
+ assertTrue( "EAR name ("+BASIC_EAR+" not found in the content box.",
+ tabMenu.getTabContentBox().getElement().getTextContent().contains(BASIC_EAR) );
+ // Go to the summary through nav tree node.
+ NavTreeNode earNode = navTree.getNodeByLabel(NAV_EAR);
+ if( !earNode.isExpanded() ){
+ log.info("Expanding.");
+ earNode.getArrowLink().click();
+ Thread.sleep(2000);
+ }
+ navTree.getNodeByLabel(BASIC_EAR).click();
+ // Check that we have the summary tab for the selected EAR.
+ tabMenu.getTabContentBox().getElement().getTextContent().contains(BASIC_EAR);
+ undeployEar(BASIC_EAR);
+ }
+
+
}// testNavigationToEar()
+
+
+
+
+ /**
+ * Assertion: Verify the content of the Enterprise Application Summary tab
+ *
+ *
+ * FAILS because clicking on the EAR name in list brings us to the root node Summary.
+ * https://jira.jboss.org/jira/browse/EMBJOPR-80
+ *
+ * junit.framework.ComparisonFailure: expected:<eardeployment.ear> but was:<ondra-redhat>
+ at org.jboss.jopr.jsfunit.as5.EarTest.testEarSummaryTab(EarTest.java:323)
+ */
+ public void DISABLEDtestEarSummaryTab() throws EmbJoprTestException, IOException, Exception {
+
+ final int DEPLOY_TIMEOUT_SEC = 10;
+
+ // Deploy the EAR
+ String earFilePath = System.getProperty(SYSPROP_TESTDATA_DIR) + "/ear/"+BASIC_EAR;
+ deployEar( earFilePath );
+
+ // Wait until the EAR appears...
+ new ActiveConditionChecker(new DescribedCondition("EAR appears in Summary tab list") {
+ public boolean isTrue() throws Exception {
+ // Refresh, then check.
+ navTree.getNodeByLabel(NAV_EAR).click();
+ ContentTableRow earRow = new ContentTable().findFirstRowContainingLink(BASIC_EAR);
+ return null != earRow;
+ }
+ }).dumpPageOnTimeout(this).throwOnTimeout().waitWithTimeout(2000, 5);
+
+
+ ContentTableRow earRow = new ContentTable().getFirstRowContainingLink(BASIC_EAR);
+
+ // Wait until the Status is "UP".
+ // TODO: Replace with ActiveConditionChecker.
+ int maxLoops = DEPLOY_TIMEOUT_SEC;
+ do {
+ String statusText = earRow.getCellTextByColumnName("Status");
+ log.debug("EAR Status: "+statusText);
+ if( "UP".equals(statusText) )
+ break;
+
+ // Refresh page after 1 second.
+ navTree.getNodeByLabel(NAV_EAR).click();
+ earRow = new ContentTable().getFirstRowContainingLink(BASIC_EAR);
+
+ // We don't want an infinite loop by mistake.
+ if( maxLoops-- <= 0 ){
+ throw new EmbJoprTestException("EAR "+BASIC_EAR+" not UP after "+DEPLOY_TIMEOUT_SEC+" seconds.");
+ }
+ } while( true );
+
+ // FAILS because of EMBJOPR-80.
+ earRow.getLinkByLabel(BASIC_EAR).click();
+
+
+ // Check the values in info table(s)
+
+ // General Properties
+ ContentInfoTable infoTable = new ContentInfoTable(
+ tabMenu.getTabContentBox().getTableUnderHeader("General Properties").getElement() );
+ Properties props = infoTable.getProperties();
+
+ assertEquals(BASIC_EAR, props.getProperty("Name").trim());
+ //assertEquals("?", props.getProperty("Version")); // TODO: Where does RHQ get the version from?
+ // TODO: Fill JIRA? Description of EAR should be taken from application.xml <display-name>
+ //assertEquals("JBossTest Ear Deployment Testsuite", props.getProperty("Description"));
+
+
+ // Resource Traits
+ infoTable = new ContentInfoTable(
+ tabMenu.getTabContentBox().getTableUnderHeader("Resource Traits").getElement() );
+ props = infoTable.getProperties();
+
+
+ String path = System.getProperty(SYSPROP_DEPLOY_DIR)+"/"+BASIC_EAR;
+ assertEquals(path, props.getProperty("Path").trim());
+
+ assertEquals("no", props.getProperty("Exploded?").trim());
+
+ // Metrics Summary
+ infoTable = new ContentInfoTable(
+ tabMenu.getTabContentBox().getTableUnderHeader("Metrics Summary").getElement() );
+ // (nothing here yet)
+
+
+ // Undeploy the EAR
+ undeployEar( BASIC_EAR );
+
+ }// testEarSummary()
+
+
+
+ /**
+ *
+ * @throws java.io.IOException
+ * @throws org.jboss.jopr.jsfunit.exceptions.HtmlElementNotFoundException
+ *
+ * PASSED.
+ */
+ public void testEarConfigurationTab() throws IOException, EmbJoprTestException {
+
+ // Deploy the EAR.
+ String earFilePath = System.getProperty(SYSPROP_TESTDATA_DIR) + "/ear/"+BASIC_EAR;
+ deployEar( earFilePath );
+
+ navTree.getNodeByLabel(NAV_EAR).click();
+ waitActivelyForDeployment(DeployableTypes.EAR, BASIC_EAR, 3000, 15);
+
+ ContentTableRow earRow = new ContentTable().getFirstRowContainingLink(BASIC_EAR);
+
+ // TODO: Finish
+
+ undeployEar(BASIC_EAR);
+
+ }
+
+
+ /**
+ *
+ * @throws java.io.IOException
+ * @throws org.jboss.jopr.jsfunit.exceptions.HtmlElementNotFoundException
+ *
+ * PASSED.
+ */
+ public void testDeployUnpackedEar() throws IOException, EmbJoprTestException {
+
+
+ //DebugUtils.writeFile("sysProp.txt", System.getProperties().toString());///
+
+ // Deploy the unpacked EAR.
+ // We have to use hotdeploy - can't upload a directory.
+ unzipToDeployDir("ear/"+EAR_UNPACKED_ZIP, "");
+ // Loop, wait for the app to appear.
+ waitActivelyForDeployment( DeployableTypes.EAR, EAR_UNPACKED, 5000, 18 );
+
+
+ navTree.getNodeByLabel(NAV_EAR).click();
+
+ ContentTableRow earRow = new ContentTable().getFirstRowContainingLink(EAR_UNPACKED);
+
+ // TODO: Finish
+
+ // TODO: DeploymentUtils, DeployableTypes, isAvailable enum inner classes
+
+ // TODO: Preliminary test - check system properties, their validity, java version, etc.
+
+ }
+
+
+
+ /**
+ * Waits for the deployable to be in the UP State.
+ *
+ * @param type Type of deployable - EAR, WAR, SAR, ...
+ * @param name Name of the deployable, like 'hello.war'.
+ * @throws org.jboss.jopr.jsfunit.exceptions.EmbJoprTestException
+ * @throws java.io.IOException
+ */
+ private void waitActivelyForDeployment(
+ final DeployableTypes type, final String name,
+ int intervalMS, int retries
+ )
+ throws EmbJoprTestException, IOException
+ {
+ try {
+ String conditionDesc = type.name()+" "+name+" appears in embjopr as deployed";
+ boolean deployedSuccessfuly =
+ new ActiveConditionChecker( new DescribedCondition(conditionDesc) {
+ public boolean isTrue() throws HtmlElementNotFoundException, IOException {
+ return new DeploymentUtils().isDeployedAccordingToEmbJopr( type, name );
+ }
+ } ).dumpPageOnTimeout(this).throwOnTimeout().waitWithTimeout( intervalMS, retries );
+ }
+ catch( EmbJoprTestException ex ){ throw ex; }
+ catch( IOException ex ){ throw ex; }
+ // Wrap all exceptions to EmbJoprTestException.
+ catch( Exception ex ){
+ throw new EmbJoprTestException("Exception thrown while actively waiting for condition.", ex);
+ }
+ }
+
+
+ /**
+ * Actively waits for a given condition.
+ * @see Condition
+ */
+ private class ActiveConditionChecker {
+
+ Condition condition;
+ private boolean dumpPageOnTimout = false;
+ private boolean throwExceptionOnTimout = false;
+ private EmbjoprTestCase test;
+
+ public ActiveConditionChecker(Condition condition) {
+ this.condition = condition;
+ }
+
+ @SuppressWarnings("empty-statement")
+ public boolean waitWithTimeout( int msInterval, int retries ) throws Exception {
+
+ while( retries-- > 0 ){
+ if( this.condition.isTrue() )
+ return true;
+ try {
+ Thread.sleep(msInterval);
+ } catch (InterruptedException ex){
+ ;
+ }
+ }
+
+ // While ended, thus we reached the "timeout".
+
+ if( this.dumpPageOnTimout ){
+ try {
+ // Since this is still inner class, we could use 'this'.
+ //DebugUtils.writeFile(test.getName() + ".html", test.getClient().getPageAsText());///
+ } catch (Exception ex) { log.error("Can't dump page.", ex); }
+ }
+
+ if( this.throwExceptionOnTimout ){
+ String message = "Timeout expired while waiting for condition: "+condition.getDescription();
+ throw new EmbJoprTestException(message);
+ }
+
+ return false;
+ }
+
+ /** If called, exception is thrown if the timeout expires. */
+ private ActiveConditionChecker throwOnTimeout( /*String conditionDesc*/ ){
+ this.throwExceptionOnTimout = true;
+ //this.conditionDesc = conditionDesc;
+ return this;
+ }
+
+ // This has nothing to do with condition checking, but is convenient shorthand...
+ private ActiveConditionChecker dumpPageOnTimeout(EmbjoprTestCase test) {
+ this.dumpPageOnTimout = true;
+ this.test = test;
+ return this;
+ }
+
+ }
+
+ /** Condition for ActiveConditionChecker */
+ public interface Condition {
+ public String getDescription();
+ public boolean isTrue() throws Exception;
+ }
+
+ /** Half-implementation of Condition - takes care of the description. */
+ public abstract class DescribedCondition implements Condition {
+ private String description;
+ public DescribedCondition( String description ){
+ this.description = StringUtils.defaultIfEmpty(description, "(undescribed)");
+ }
+ public String getDescription() { return this.description; }
+ }
+
+
+
+
+
+
+ /**
+ * Utilities for performing and checking deployment.
+ * In the future, it should be general interface like
+ * boolean isDeployed( DeployableType type, String name ).
+ */
+ protected class DeploymentUtils {
+
+ /**
+ * Returns true if EmbJopr lists a deployable of given type and name,
+ * and it's State is UP; false otherwise.
+ */
+ private boolean isDeployedAccordingToEmbJopr( DeployableTypes type, String deployableName )
+ throws HtmlElementNotFoundException, IOException
+ {
+ // Refresh / go to the appropriate page.
+ navTree.getNodeByLabel( type.getNavTreeLabel() ).click();
+ ContentTableRow earRow = new ContentTable().findFirstRowContainingLink(deployableName);
+ if( null == earRow ){
+ log.debug("Row with "+deployableName+" not present.");
+ return false;
+ }
+
+ String statusText = earRow.getCellTextByColumnName("Status");
+ if( "UP".equals(statusText) ){
+ return true;
+ }else{
+ log.debug("Row with "+deployableName+" has Status == '"+statusText+"' != UP.");
+ return false;
+ }
+ }
+
+ /**
+ * Returns true if there's a file of the given name in server's deploy dir;
+ * false otherwise.
+ */
+ private boolean isDeployedAccordingToFileSystem( DeployableTypes type, String name )
+ {
+ String deployPath = System.getProperty(SYSPROP_DEPLOY_DIR);
+ String fileName = deployPath+"/"+name;
+ return (new File(fileName)).exists();
+ }
+
+ private void undeployViaFileSystem( String name ) throws EmbJoprTestException{
+ String deployPath = System.getProperty(SYSPROP_DEPLOY_DIR);
+ String fileName = deployPath+"/"+name;
+ File fileToDelete = new File(fileName);
+
+ if( !fileToDelete.exists() )
+ throw new EmbJoprTestException("Deployable doesn't exist: "+fileName);
+
+ if(fileToDelete.isFile()){
+ if( !fileToDelete.delete() ){
+ throw new EmbJoprTestException("Unable to delete: "+fileName);
+ }
+ }else if(fileToDelete.isDirectory()){
+ deleteDirectory(fileToDelete);
+ }
+
+
+ }
+
+ }
+
+
+ // TODO: Move to utils
+ /**
+ * Unzips given archive from testdata dir to server's deploy/ dir.
+ * @param relativeArchivePath Path of the archive relative to testdata dir.
+ * @param relativeDestDir Path of the destination dir relative to deploy dir.
+ */
+ private void unzipToDeployDir( String relativeArchivePath, String relativeDestDir )
+ throws FileNotFoundException, IOException
+ {
+
+ String destDir = System.getProperty(SYSPROP_DEPLOY_DIR)+"/"+relativeDestDir;
+ String archivePath = System.getProperty(SYSPROP_TESTDATA_DIR)+"/"+relativeArchivePath;
+
+ log.info("Unzipping '"+archivePath+"' to '"+destDir+"'.");
+
+ unzipArchive( archivePath, destDir );
+ }
+
+
+
+ /**
+ * Unzips archive from the given path to the given destination dir.
+ */
+ private void unzipArchive(String archivePath, String destDir)
+ throws FileNotFoundException, IOException
+ {
+
+ FileInputStream fis = new FileInputStream( archivePath );
+ ZipInputStream zin = new ZipInputStream(new BufferedInputStream(fis));
+
+ ZipEntry entry;
+ while( null != (entry = zin.getNextEntry()) ){
+
+ if(entry.isDirectory()) {
+ // Assume directories are stored parents first then children.
+ log.info("Extracting directory: " + entry.getName());
+ // This is not robust, just for demonstration purposes.
+ (new File(destDir +"/"+ entry.getName())).mkdir();
+ continue;
+ }
+
+ log.info("Extracting file: " + entry.getName());
+
+ final int BUFFER = 2048;
+ FileOutputStream fos = new FileOutputStream( destDir +"/"+ entry.getName());
+ BufferedOutputStream dest = new BufferedOutputStream(fos, BUFFER);
+
+ int count;
+ byte[] data = new byte[BUFFER];
+ while ((count = zin.read(data, 0, BUFFER)) != -1) {
+ dest.write(data, 0, count);
+ }
+ dest.flush();
+ dest.close();
+ zin.closeEntry();
+
+ }
+
+ zin.close();
+
+ }
+
+
+
+
+ // TODO: Move to utils
+ private void deleteFromDeployDir( String deployableName ) throws IOException{
+
+ String deployDir = System.getProperty(SYSPROP_DEPLOY_DIR);
+
+ File dirToDelete = new File( deployDir, deployableName);
+ // Just not to delete something accidentally...
+ assertTrue( deployDir.contains("/server/"));
+ // Check if not outside deploy dir.
+ if( !dirToDelete.getCanonicalPath().startsWith( deployDir ) )
+ throw new IllegalArgumentException(
+ " The resulting path is outside deploy dir: "+dirToDelete.getCanonicalPath());
+
+ log.info("Deleting '"+dirToDelete.getPath()+"'...");
+ //deleteDirectory( dirToDelete );
+ }
+
+
+
+ public static void deleteDirectory(File path) throws EmbJoprTestException
+ {
+ List<String> undeletableFiles = new ArrayList();
+ deleteDirectory(path, undeletableFiles);
+ if( !undeletableFiles.isEmpty() ){
+ throw new EmbJoprTestException("Couldn't delete following files: \n "+
+ StringUtils.join(undeletableFiles, "\n ") + "\n");
+ }
+ }
+
+ public static void deleteDirectory(File path, List<String> undeletableFiles)
+ {
+ if( path.exists() ) {
+ File[] files = path.listFiles();
+ for(int i=0; i<files.length; i++) {
+ if(files[i].isDirectory()) {
+ deleteDirectory(files[i], undeletableFiles );
+ }
+ else {
+ if( !files[i].delete() ){
+ undeletableFiles.add(files[i].getAbsolutePath());
+ }
+ }
+ }
+ }
+ if( ! path.delete() )
+ undeletableFiles.add( path.getAbsolutePath() );
+ }
+
private void deployEar( String earFilePath ) throws IOException
{
+ if( !(new File(earFilePath)).exists())
+ throw new FileNotFoundException(earFilePath);
+ log.info("Deploying: "+earFilePath);
+
// Navigate to Enterprise Archives
navTree.getNodeLink(NAV_EAR).click();
// click on the "Add new resource" button
client.click("actionHeaderForm:addNewContent"); // 404 if setThrowExceptionOnFailingStatusCode(true) above
- // upload hellothere.war
+ // Upload the file
HtmlFileInput fileInput = (HtmlFileInput)client.getElement("createContentForm:file");
fileInput.setContentType("application/ear");
fileInput.setValueAttribute(earFilePath);
client.click("createContentForm:addButton");
+ sleep( 2000 );
+
+ // Log the message
+ logServerMessage("Something went wrong with deploy: ");
}
- private void undeployEar( String earFileName ) throws IOException, EmbJoprTestException
+ private void undeployEar( String earFileName ) throws IOException, HtmlElementNotFoundException, ActionNotAvailableException
{
// Navigate to Enterprise Archives
@@ -247,9 +759,37 @@
HtmlButtonInput deleteButton = getAppDeleteButton( earFileName );
deleteButton.click();
+ // Log the message
+ logServerMessage("Something went wrong with undeploy: ");
+ // Sleep for 3 sec.
+ sleep( 3000 );
+
}
+ private void logServerMessage(){ logServerMessage(""); }
-}
+ private void logServerMessage( String warnPrefix ){
+ if( server.getFacesMessages().hasNext() ){
+ FacesMessage msg = server.getFacesMessages().next();
+ if( msg.getSeverity() == FacesMessage.SEVERITY_INFO ){
+ log.info( msg.getSummary() +"\n"+ msg.getDetail() );
+ }else{
+ log.warn( warnPrefix + msg.getSummary() +"\n"+ msg.getDetail() );
+ }
+ }
+ }
+
+ /** Calls Thread.sleep(ms), ignores the InterruptedException. */
+ @SuppressWarnings("empty-statement")
+ private void sleep( int ms ) {
+ try {
+ Thread.sleep(3000);
+ } catch (InterruptedException ex) {
+ ; // We don't care, that's the purpose of this method.
+ }
+ }
+
+
+}// class EarTest
15 years, 10 months
EMBJOPR SVN: r170 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-02-26 21:04:19 -0500 (Thu, 26 Feb 2009)
New Revision: 170
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java
Log:
Getters for client and server.
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-25 18:43:20 UTC (rev 169)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java 2009-02-27 02:04:19 UTC (rev 170)
@@ -70,6 +70,10 @@
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";
@@ -83,9 +87,9 @@
{
// Announce this test in the JBoss log.
- log.info("==================================================================");
- log.info(" Setting up test "+this.getName());
- log.info("==================================================================");
+ log.info("========================================================================================");
+ log.info(" Setting up test "+this.getClass().getName()+"#"+this.getName());
+ log.info("========================================================================================");
// JVM version
15 years, 10 months
EMBJOPR SVN: r169 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-02-25 13:43:20 -0500 (Wed, 25 Feb 2009)
New Revision: 169
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/HelloJoprTest.java
Log:
Removed debug file creation.
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/HelloJoprTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/HelloJoprTest.java 2009-02-24 18:54:13 UTC (rev 168)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/HelloJoprTest.java 2009-02-25 18:43:20 UTC (rev 169)
@@ -111,7 +111,6 @@
client.click("createContentForm:addButton");
// assert that the success message appeared on the client side
- DebugUtils.writeFile("hello.html", client.getPageAsText());
assertTrue(client.getPageAsText().contains("hellothere.war created successfully"));
// assert text and sevrity level for FacesMessage on server side
15 years, 10 months
EMBJOPR SVN: r168 - trunk/jsfunit/testdata/jboss-configuration/conf.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-02-24 13:54:13 -0500 (Tue, 24 Feb 2009)
New Revision: 168
Modified:
trunk/jsfunit/testdata/jboss-configuration/conf/jboss-log4j.xml
Log:
Setting tests log level to WARN for org.jboss.seam and org.ajax4jsf
Modified: trunk/jsfunit/testdata/jboss-configuration/conf/jboss-log4j.xml
===================================================================
--- trunk/jsfunit/testdata/jboss-configuration/conf/jboss-log4j.xml 2009-02-23 20:24:29 UTC (rev 167)
+++ trunk/jsfunit/testdata/jboss-configuration/conf/jboss-log4j.xml 2009-02-24 18:54:13 UTC (rev 168)
@@ -185,6 +185,15 @@
<category name="com.gargoylesoftware.htmlunit.DefaultCssErrorHandler">
<priority value="ERROR"/>
</category>
+
+ <category name="org.jboss.seam">
+ <priority value="WARN"/>
+ </category>
+ <category name="org.ajax4jsf">
+ <priority value="WARN"/>
+ </category>
+
+
<!-- We care much about JOPR and JSFUnit tests. -->
<category name="org.jboss.jopr.jsfunit">
15 years, 10 months
EMBJOPR SVN: r167 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-02-23 15:24:29 -0500 (Mon, 23 Feb 2009)
New Revision: 167
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java
Log:
Proper test name in log
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-23 17:40:09 UTC (rev 166)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java 2009-02-23 20:24:29 UTC (rev 167)
@@ -84,7 +84,7 @@
// Announce this test in the JBoss log.
log.info("==================================================================");
- log.info(" Setting up test "+this.getClass().getName());
+ log.info(" Setting up test "+this.getName());
log.info("==================================================================");
@@ -119,7 +119,7 @@
@Override
protected void tearDown() throws Exception {
// Denounce this test in the JBoss log.
- log.info("------ END OF TEST "+this.getClass().getName()+" -------");
+ log.info("------ END OF TEST "+this.getName()+" -------");
}
15 years, 10 months
EMBJOPR SVN: r166 - trunk/jsfunit.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-02-23 12:40:09 -0500 (Mon, 23 Feb 2009)
New Revision: 166
Modified:
trunk/jsfunit/pom.xml
Log:
Changed pom to test on Hudson.
Modified: trunk/jsfunit/pom.xml
===================================================================
--- trunk/jsfunit/pom.xml 2009-02-23 17:08:37 UTC (rev 165)
+++ trunk/jsfunit/pom.xml 2009-02-23 17:40:09 UTC (rev 166)
@@ -353,6 +353,7 @@
<exclude>**/as5/*Datasource*</exclude>
-->
<!-- Temporarily disable as it fails now -->
+ <exclude>**/as5/EarTest.java</exclude>
<exclude>**/*ServerNodeSummaryTest*</exclude>
</excludes>
<systemProperties>
15 years, 10 months
EMBJOPR SVN: r165 - trunk/jsfunit/testdata/ear.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-02-23 12:08:37 -0500 (Mon, 23 Feb 2009)
New Revision: 165
Modified:
trunk/jsfunit/testdata/ear/malformed-application-xml.ear
Log:
Changed malformed-app-xml.ear
Modified: trunk/jsfunit/testdata/ear/malformed-application-xml.ear
===================================================================
(Binary files differ)
15 years, 10 months