[jboss-cvs] JBossAS SVN: r87016 - in branches/Branch_5_x: testsuite/src/main/org/jboss/test/profileservice/test and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Apr 8 18:51:12 EDT 2009
Author: scott.stark at jboss.org
Date: 2009-04-08 18:51:12 -0400 (Wed, 08 Apr 2009)
New Revision: 87016
Modified:
branches/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management/templates/JmsDestinationTemplate.java
branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/AbstractProfileServiceTest.java
branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java
Log:
JBAS-6755, template properties may be missing so don't require non-null values
Modified: branches/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management/templates/JmsDestinationTemplate.java
===================================================================
--- branches/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management/templates/JmsDestinationTemplate.java 2009-04-08 22:35:17 UTC (rev 87015)
+++ branches/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management/templates/JmsDestinationTemplate.java 2009-04-08 22:51:12 UTC (rev 87016)
@@ -281,7 +281,9 @@
Map<String, ManagedProperty> propsInfo = info.getProperties();
ManagedProperty prop = propsInfo.get(propName);
if(prop == null)
+ {
return null;
+ }
Object value = prop.getValue();
if(value instanceof MetaValue)
{
Modified: branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/AbstractProfileServiceTest.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/AbstractProfileServiceTest.java 2009-04-08 22:35:17 UTC (rev 87015)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/AbstractProfileServiceTest.java 2009-04-08 22:51:12 UTC (rev 87016)
@@ -21,6 +21,7 @@
*/
package org.jboss.test.profileservice.test;
+import java.util.Collections;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
@@ -104,9 +105,21 @@
{
createComponentTest(templateName, propValues, deploymentName, componentType, componentName, true);
}
-
+
protected void createComponentTest(String templateName,
+ Map<String, MetaValue> propValues,
+ String deploymentName,
+ ComponentType componentType, String componentName,
+ boolean processChanges)
+ throws Exception
+ {
+ Set<String> removedPropNames = Collections.emptySet();
+ createComponentTest(templateName, propValues, removedPropNames,
+ deploymentName, componentType, componentName, processChanges);
+ }
+ protected void createComponentTest(String templateName,
Map<String, MetaValue> propValues,
+ Set<String> removedPropNames,
String deploymentName,
ComponentType componentType, String componentName,
boolean processChanges)
@@ -124,6 +137,12 @@
prop.setValue(propValues.get(propName));
log.debug("createComponentTest("+propName+") after: "+prop.getValue());
}
+ for(String propName : removedPropNames)
+ {
+ ManagedProperty prop = props.get(propName);
+ prop.setRemoved(true);
+ log.debug("removed property: "+propName);
+ }
mgtView.applyTemplate(deploymentName, info);
if(processChanges)
Modified: branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java 2009-04-08 22:35:17 UTC (rev 87015)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java 2009-04-08 22:51:12 UTC (rev 87016)
@@ -23,6 +23,7 @@
import java.util.Arrays;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -302,12 +303,12 @@
Map<String, MetaValue> propValues = new HashMap<String, MetaValue>();
String jndiName = getName();
propValues.put("JNDIName", SimpleValueSupport.wrap(jndiName));
- createComponentTest("TopicTemplate", propValues, getName(), TopicType, jndiName);
+ HashSet<String> removedProps = new HashSet<String>();
+ removedProps.add("serverPeer");
+ createComponentTest("TopicTemplate", propValues, removedProps, getName(), TopicType, jndiName, true);
ManagedComponent topic = activeView.getComponent("testCreateTopic", TopicType);
assertNotNull(topic);
assertEquals("testCreateTopic", topic.getName());
-
-
}
/**
More information about the jboss-cvs-commits
mailing list