Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Changes in testsuite after bug fixing

  • Loading branch information...
commit 8fa01a40111bbf9e206f8f7a6d97dd244417f676 1 parent 3510dcf
Vladimir Rastseluev authored
View
6 ...c/test/java/org/jboss/as/connector/subsystems/jca/ComplexDatasourceSubsystemTestCase.java
@@ -32,7 +32,7 @@
import java.util.Properties;
-import static org.jboss.as.connector.subsystems.jca.ParseUtils.controlModelParams;
+import static org.jboss.as.connector.subsystems.jca.ParseUtils.checkModelParams;
import static org.jboss.as.connector.subsystems.jca.ParseUtils.nonXaDsProperties;
import static org.jboss.as.connector.subsystems.jca.ParseUtils.xaDsProperties;
@@ -72,14 +72,14 @@ protected Type getType() {
final String complexDsJndi = "java:jboss/datasources/" + complexDs;
Properties params=nonXaDsProperties(complexDsJndi);
ModelNode modelDs=model.get("subsystem", "datasources","data-source",complexDs+"_Pool");
- controlModelParams(modelDs,params);
+ checkModelParams(modelDs,params);
Assert.assertEquals(modelDs.asString(),"UTF-8",modelDs.get("connection-properties","char.encoding","value").asString());
final String complexXaDs = "complexXaDs";
final String complexXaDsJndi = "java:jboss/xa-datasources/" + complexXaDs;
params=xaDsProperties(complexXaDsJndi);
ModelNode modelXaDs=model.get("subsystem", "datasources","xa-data-source",complexXaDs+"_Pool");
- controlModelParams(modelXaDs,params);
+ checkModelParams(modelXaDs,params);
Assert.assertEquals(modelXaDs.asString(),"jdbc:h2:mem:test",modelXaDs.get("xa-datasource-properties","URL","value").asString());
//Marshal the xml to see that it is the same as before
View
11 .../java/org/jboss/as/connector/subsystems/jca/ComplexResourceAdaptersSubsystemTestCase.java
@@ -21,7 +21,7 @@
*/
package org.jboss.as.connector.subsystems.jca;
-import static org.jboss.as.connector.subsystems.jca.ParseUtils.controlModelParams;
+import static org.jboss.as.connector.subsystems.jca.ParseUtils.checkModelParams;
import static org.jboss.as.connector.subsystems.jca.ParseUtils.raAdminProperties;
import static org.jboss.as.connector.subsystems.jca.ParseUtils.raCommonProperties;
import static org.jboss.as.connector.subsystems.jca.ParseUtils.raConnectionProperties;
@@ -71,17 +71,18 @@ protected Type getType() {
// Check model..
Properties params=raCommonProperties();
ModelNode raCommonModel=model.get("subsystem", "resource-adapters","resource-adapter","some.rar");
- controlModelParams(raCommonModel,params);
+ checkModelParams(raCommonModel,params);
Assert.assertEquals(raCommonModel.asString(),"A",raCommonModel.get("config-properties","Property","value").asString());
-
+ Assert.assertEquals(raCommonModel.get("beanvalidationgroups").asString(),raCommonModel.get("beanvalidationgroups").asString(), "[\"Class0\",\"Class00\"]");
+
params=raAdminProperties();
ModelNode raAdminModel=raCommonModel.get("admin-objects", "Pool2");
- controlModelParams(raAdminModel,params);
+ checkModelParams(raAdminModel,params);
Assert.assertEquals(raAdminModel.asString(),"D",raAdminModel.get("config-properties","Property","value").asString());
params=raConnectionProperties();
ModelNode raConnModel=raCommonModel.get("connection-definitions", "Pool1");
- controlModelParams(raConnModel,params);
+ checkModelParams(raConnModel,params);
Assert.assertEquals(raConnModel.asString(),"B",raConnModel.get("config-properties","Property","value").asString());
Assert.assertEquals(raConnModel.asString(),"C",raConnModel.get("recovery-plugin-properties","Property").asString());
View
2  connector/src/test/java/org/jboss/as/connector/subsystems/jca/ParseUtils.java
@@ -242,7 +242,7 @@ public static void addExtensionProperties(ModelNode operation){
* @param model
* @param params
*/
- public static void controlModelParams(ModelNode node,Properties params){
+ public static void checkModelParams(ModelNode node,Properties params){
String str;
StringBuffer sb = new StringBuffer();
View
8 testsuite/groupDefs.sh
@@ -10,10 +10,10 @@ BASIC_TESTS="-Dts.basic"
CLUSTER_TESTS="-Dts.clust"
IIOP_TESTS="-Dts.iiop"
-BENCHMARK_TESTS="-Dbenchmark.module -DnoSmoke"
-STRESS_TESTS="-Dstress.module -DnoSmoke"
-DOMAIN_TESTS="-Ddomain.module -DnoSmoke"
-COMPAT_TESTS="-Dcompat.module -DnoSmoke"
+BENCHMARK_TESTS="-Dbenchmark.module -Dts.noSmoke"
+STRESS_TESTS="-Dstress.module -Dts.noSmoke"
+DOMAIN_TESTS="-Ddomain.module -Dts.noSmoke"
+COMPAT_TESTS="-Dcompat.module -Dts.noSmoke"
#ALL_TESTS="$INTEGRATION_TESTS $DOMAIN_TESTS $COMPAT_TESTS $SMOKE_TESTS"
#ALL_TESTS="$INTEGRATION_TESTS -Ddomain.module -Dcompat.module $SMOKE_TESTS"
View
6 ...va/org/jboss/as/test/smoke/embedded/mgmt/datasource/DataSourceOperationsUnitTestCase.java
@@ -596,8 +596,9 @@ public void testAddComplexDs() throws Exception {
Assert.assertNotNull("Reparsing failed:",newList);
ModelNode rightChild=findNodeWithProperty(newList,"jndi-name",complexDsJndi);
+
+ Assert.assertTrue("node:"+rightChild.asString()+";\nparams"+params,checkModelParams(rightChild, params));
- Assert.assertTrue(checkModelParams(rightChild, params));
}
/**
* AS7-2720 tests for parsing particular XA-datasource in standalone mode
@@ -645,8 +646,9 @@ public void testAddComplexXaDs() throws Exception {
Assert.assertNotNull("Reparsing failed:",newList);
ModelNode rightChild=findNodeWithProperty(newList,"jndi-name",complexXaDsJndi);
+
+ Assert.assertTrue("node:"+rightChild.asString()+";\nparams"+params,checkModelParams(rightChild, params));
- Assert.assertTrue(checkModelParams(rightChild, params));
}
View
35 ...ss/as/test/smoke/embedded/mgmt/resourceadapter/ResourceAdapterOperationsUnitTestCase.java
@@ -22,13 +22,10 @@
package org.jboss.as.test.smoke.embedded.mgmt.resourceadapter;
-import static org.jboss.as.arquillian.container.Authentication.getCallbackHandler;
+
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OP;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OP_ADDR;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OUTCOME;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.RECURSIVE;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.RESULT;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.SUCCESS;
import static org.jboss.as.test.integration.management.util.ComplexPropertiesParseUtils.setOperationParams;
import static org.jboss.as.test.integration.management.util.ComplexPropertiesParseUtils.raCommonProperties;
@@ -42,19 +39,11 @@
import java.io.IOException;
import java.io.StringReader;
import java.io.StringWriter;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.Properties;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Enumeration;
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectName;
import javax.xml.namespace.QName;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLOutputFactory;
@@ -65,14 +54,9 @@
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.container.test.api.RunAsClient;
import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.as.arquillian.container.TunneledMBeanServerConnection;
import org.jboss.as.connector.subsystems.resourceadapters.ResourceAdaptersExtension.ResourceAdapterSubsystemParser;
import org.jboss.as.connector.subsystems.resourceadapters.Namespace;
-import org.jboss.as.controller.client.ModelControllerClient;
import org.jboss.as.controller.persistence.SubsystemMarshallingContext;
-import org.jboss.as.protocol.StreamUtils;
-import org.jboss.as.test.smoke.embedded.demos.fakejndi.FakeJndi;
-import org.jboss.as.test.smoke.modular.utils.PollingUtils;
import org.jboss.as.test.smoke.modular.utils.ShrinkWrapUtils;
import org.jboss.dmr.ModelNode;
import org.jboss.shrinkwrap.api.Archive;
@@ -92,7 +76,7 @@
*/
@RunWith(Arquillian.class)
@RunAsClient
-@Ignore("AS7-3068, AS7-3007")
+@Ignore("AS7-3185")
public class ResourceAdapterOperationsUnitTestCase extends AbstractMgmtTestBase {
@@ -122,6 +106,8 @@ public void complexResourceAdapterAddTest() throws Exception{
operation.get(OP).set("add");
operation.get(OP_ADDR).set(address);
setOperationParams(operation,params);
+ operation.get("beanvalidationgroups").add("Class0");
+ operation.get("beanvalidationgroups").add("Class00");
executeOperation(operation);
final ModelNode address1=address.clone();
@@ -185,27 +171,22 @@ public void complexResourceAdapterAddTest() throws Exception{
List<ModelNode> newList = marshalAndReparseRaResources("resource-adapter");
- //{{work around AS7-3068
- final ModelNode operation1 = new ModelNode();
- operation1.get(OP).set("remove");
- operation1.get(OP_ADDR).set(address);
- executeOperation(operation1,false);
- //}}
remove(address);
Assert.assertNotNull(newList);
ModelNode node=findNodeWithProperty(newList,"archive","some.rar");
Assert.assertNotNull("There is no archive element:"+newList,node);
- checkModelParams(node,params);
+ Assert.assertTrue("node:"+node.asString()+";\nparams"+params,checkModelParams(node,params));
+ Assert.assertEquals("beanvalidationgroups element is incorrect:"+node.get("beanvalidationgroups").asString(),node.get("beanvalidationgroups").asString(), "[\"Class0\",\"Class00\"]");
node=findNodeWithProperty(newList,"jndi-name","java:jboss/name1");
Assert.assertNotNull("There is no connection jndi-name element:"+newList,node);
- checkModelParams(node,conParams);
+ Assert.assertTrue("node:"+node.asString()+";\nparams"+conParams,checkModelParams(node,conParams));
node=findNodeWithProperty(newList,"jndi-name","java:jboss/Name3");
Assert.assertNotNull("There is no admin jndi-name element:"+newList,node);
- checkModelParams(node,admParams);
+ Assert.assertTrue("node:"+node.asString()+";\nparams"+admParams,checkModelParams(node,admParams));
node=findNodeWithProperty(newList,"value","D");
Assert.assertNotNull("There is no admin-object config-property element:"+newList,node);
View
14 .../main/java/org/jboss/as/test/integration/management/util/ComplexPropertiesParseUtils.java
@@ -237,29 +237,25 @@ public static void addExtensionProperties(ModelNode operation){
}
/**
- * Checks if result of reparsing contains certain parameters
+ * Checks if result of re-parsing contains certain parameters
* @param model
* @param params
- * @returns whether the node is ok
+ * @returns boolean whether the node is ok
*/
public static boolean checkModelParams(ModelNode node,Properties params){
if (node==null) return false;
- String str;
- StringBuffer sb = new StringBuffer();
- String par,child;
+ String str, par;
Enumeration e = params.propertyNames();
while (e.hasMoreElements()) {
str=(String)e.nextElement();
par=params.getProperty(str);
- if (node.get(str)==null) sb.append("Parameter <"+str+"> is not set, but must be set to '"+par+"' \n");
+ if (node.get(str)==null) return false;
else{
- child= node.get(str).asString();
- if (!child.equals(par)) sb.append("Parameter <"+str+"> is set to '"+child+"', but must be set to '"+par+"' \n");
+ if (!node.get(str).asString().equals(par)) return false;
}
}
- if (sb.length()>0) return false;
return true;
}
Please sign in to comment.
Something went wrong with that request. Please try again.