Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update subsystem transformer and mixed domain tests to use EAP 7.2 #12049

Merged
merged 4 commits into from Feb 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -92,7 +92,14 @@
* Domain extension that integrates Apache ActiveMQ 6.
*
* <dl>
* <dt><strong>Current</strong> - WildFly 15</dt>
* <dt><strong>Current</strong> - WildFly 16</dt>
* <dd>
* <ul>
* <li>XML namespace: urn:jboss:domain:messaging-activemq:6.0
* <li>Management model: 6.0.0
* </ul>
* </dd>
* <dt>WildFly 15</dt>
* <dd>
* <ul>
* <li>XML namespace: urn:jboss:domain:messaging-activemq:5.0
Expand Down
Expand Up @@ -119,6 +119,10 @@ public void testHAPolicyConfiguration() throws Exception {
///////////////////////
// Transformers test //
///////////////////////
@Test
public void testTransformersEAP_7_2_0() throws Exception {
testTransformers(ModelTestControllerVersion.EAP_7_2_0, MessagingExtension.VERSION_4_0_0);
}

@Test
public void testTransformersEAP_7_1_0() throws Exception {
Expand All @@ -130,6 +134,11 @@ public void testTransformersEAP_7_0_0() throws Exception {
testTransformers(EAP_7_0_0, MessagingExtension.VERSION_1_0_0);
}

@Test
public void testRejectingTransformersEAP_7_2_0() throws Exception {
testRejectingTransformers(ModelTestControllerVersion.EAP_7_2_0, MessagingExtension.VERSION_4_0_0);
}

@Test
public void testRejectingTransformersEAP_7_1_0() throws Exception {
testRejectingTransformers(EAP_7_1_0, MessagingExtension.VERSION_2_0_0);
Expand Down Expand Up @@ -251,26 +260,29 @@ private void testRejectingTransformers(ModelTestControllerVersion controllerVers
.addFailedAttribute(subsystemAddress.append(SERVER_PATH, CONNECTION_FACTORY_PATH),
new FailedOperationTransformationConfig.NewAttributesConfig(
ConnectionFactoryAttributes.Common.INITIAL_MESSAGE_PACKET_SIZE));
} else {
config.addFailedAttribute(subsystemAddress.append(SERVER_PATH),
} else if(messagingVersion.compareTo(MessagingExtension.VERSION_5_0_0) > 0 ){
config.addFailedAttribute(subsystemAddress.append(SERVER_PATH),
new FailedOperationTransformationConfig.NewAttributesConfig(
ServerDefinition.GLOBAL_MAX_DISK_USAGE,
ServerDefinition.DISK_SCAN_PERIOD,
ServerDefinition.GLOBAL_MAX_MEMORY_SIZE));
}
config.addFailedAttribute(subsystemAddress.append(SERVER_PATH, MessagingExtension.BROADCAST_GROUP_PATH), new FailedOperationTransformationConfig.NewAttributesConfig(BroadcastGroupDefinition.JGROUPS_CHANNEL));
config.addFailedAttribute(subsystemAddress.append(SERVER_PATH, DiscoveryGroupDefinition.PATH), new FailedOperationTransformationConfig.NewAttributesConfig(DiscoveryGroupDefinition.JGROUPS_CHANNEL));
config.addFailedAttribute(subsystemAddress.append(SERVER_PATH, MessagingExtension.QUEUE_PATH), new FailedOperationTransformationConfig.NewAttributesConfig(QueueDefinition.ROUTING_TYPE));
config.addFailedAttribute(subsystemAddress.append(DiscoveryGroupDefinition.PATH), FailedOperationTransformationConfig.REJECTED_RESOURCE);
config.addFailedAttribute(subsystemAddress.append(pathElement(CommonAttributes.REMOTE_CONNECTOR)), FailedOperationTransformationConfig.REJECTED_RESOURCE);
config.addFailedAttribute(subsystemAddress.append(pathElement(CommonAttributes.IN_VM_CONNECTOR)), FailedOperationTransformationConfig.REJECTED_RESOURCE);
config.addFailedAttribute(subsystemAddress.append(pathElement(CommonAttributes.CONNECTOR)), FailedOperationTransformationConfig.REJECTED_RESOURCE);
config.addFailedAttribute(subsystemAddress.append(MessagingExtension.HTTP_CONNECTOR_PATH), FailedOperationTransformationConfig.REJECTED_RESOURCE);
config.addFailedAttribute(subsystemAddress.append(CONNECTION_FACTORY_PATH), FailedOperationTransformationConfig.REJECTED_RESOURCE);
config.addFailedAttribute(subsystemAddress.append(POOLED_CONNECTION_FACTORY_PATH), FailedOperationTransformationConfig.REJECTED_RESOURCE);
config.addFailedAttribute(subsystemAddress.append(EXTERNAL_JMS_QUEUE_PATH), FailedOperationTransformationConfig.REJECTED_RESOURCE);
config.addFailedAttribute(subsystemAddress.append(EXTERNAL_JMS_TOPIC_PATH), FailedOperationTransformationConfig.REJECTED_RESOURCE);

if (messagingVersion.compareTo(MessagingExtension.VERSION_4_0_0) > 0) {
config.addFailedAttribute(subsystemAddress.append(SERVER_PATH, MessagingExtension.BROADCAST_GROUP_PATH), new FailedOperationTransformationConfig.NewAttributesConfig(BroadcastGroupDefinition.JGROUPS_CHANNEL));
config.addFailedAttribute(subsystemAddress.append(SERVER_PATH, DiscoveryGroupDefinition.PATH), new FailedOperationTransformationConfig.NewAttributesConfig(DiscoveryGroupDefinition.JGROUPS_CHANNEL));
config.addFailedAttribute(subsystemAddress.append(SERVER_PATH, MessagingExtension.QUEUE_PATH), new FailedOperationTransformationConfig.NewAttributesConfig(QueueDefinition.ROUTING_TYPE));
config.addFailedAttribute(subsystemAddress.append(DiscoveryGroupDefinition.PATH), FailedOperationTransformationConfig.REJECTED_RESOURCE);
config.addFailedAttribute(subsystemAddress.append(pathElement(CommonAttributes.REMOTE_CONNECTOR)), FailedOperationTransformationConfig.REJECTED_RESOURCE);
config.addFailedAttribute(subsystemAddress.append(pathElement(CommonAttributes.IN_VM_CONNECTOR)), FailedOperationTransformationConfig.REJECTED_RESOURCE);
config.addFailedAttribute(subsystemAddress.append(pathElement(CommonAttributes.CONNECTOR)), FailedOperationTransformationConfig.REJECTED_RESOURCE);
config.addFailedAttribute(subsystemAddress.append(MessagingExtension.HTTP_CONNECTOR_PATH), FailedOperationTransformationConfig.REJECTED_RESOURCE);
config.addFailedAttribute(subsystemAddress.append(CONNECTION_FACTORY_PATH), FailedOperationTransformationConfig.REJECTED_RESOURCE);
config.addFailedAttribute(subsystemAddress.append(POOLED_CONNECTION_FACTORY_PATH), FailedOperationTransformationConfig.REJECTED_RESOURCE);
config.addFailedAttribute(subsystemAddress.append(EXTERNAL_JMS_QUEUE_PATH), FailedOperationTransformationConfig.REJECTED_RESOURCE);
config.addFailedAttribute(subsystemAddress.append(EXTERNAL_JMS_TOPIC_PATH), FailedOperationTransformationConfig.REJECTED_RESOURCE);
} else if (messagingVersion.compareTo(MessagingExtension.VERSION_6_0_0) > 0) {
config.addFailedAttribute(subsystemAddress.append(SERVER_PATH, MessagingExtension.QUEUE_PATH), new FailedOperationTransformationConfig.NewAttributesConfig(QueueDefinition.ROUTING_TYPE));
}
ModelTestUtils.checkFailedTransformedBootOperations(mainServices, messagingVersion, ops, config);
}

Expand Down
Expand Up @@ -37,6 +37,15 @@ public class MessagingDependencies {
static {
Map<ModelTestControllerVersion, String[]> map = new HashMap<ModelTestControllerVersion, String[]>();

map.put(ModelTestControllerVersion.EAP_7_2_0, new String[] {
"org.apache.activemq:artemis-commons:2.6.3.redhat-00014",
"org.apache.activemq:artemis-journal:2.6.3.redhat-00014",
"org.apache.activemq:artemis-server:2.6.3.redhat-00014",
"org.apache.activemq:artemis-jms-server:2.6.3.redhat-00014",
"org.apache.activemq:artemis-core-client:2.6.3.redhat-00014",
"org.apache.activemq:artemis-jms-client:2.6.3.redhat-00014",
"org.apache.activemq:artemis-ra:2.6.3.redhat-00014",
});
map.put(ModelTestControllerVersion.EAP_7_1_0, new String[] {
"org.apache.activemq:artemis-commons:1.5.5.008-redhat-1",
"org.apache.activemq:artemis-journal:1.5.5.008-redhat-1",
Expand Down Expand Up @@ -65,16 +74,26 @@ static String[] getActiveMQDependencies(ModelTestControllerVersion controllerVer
}

static String getMessagingActiveMQGAV(ModelTestControllerVersion version) {
return "org.jboss.eap:wildfly-messaging-activemq:" + version.getMavenGavVersion();
if (version.isEap()) {
return "org.jboss.eap:wildfly-messaging-activemq:" + version.getMavenGavVersion();
}
return "org.wildfly:wildfly-messaging-activemq:" + version.getMavenGavVersion();
}

static String[] getJGroupsDependencies(ModelTestControllerVersion version) {
return new String[] {
if (version.isEap()) {
return new String[]{
String.format("org.jboss.eap:wildfly-clustering-common:%s", version.getMavenGavVersion()),
String.format("org.jboss.eap:wildfly-clustering-jgroups-api:%s", version.getMavenGavVersion()),
String.format("org.jboss.eap:wildfly-clustering-jgroups-extension:%s", version.getMavenGavVersion()),
String.format("org.jboss.eap:wildfly-clustering-jgroups-spi:%s", version.getMavenGavVersion()),
"org.jgroups:jgroups:3.6.12.Final-redhat-1",
};
"org.jgroups:jgroups:3.6.12.Final-redhat-1",};
}
return new String[]{
String.format("org.wildfly:wildfly-clustering-common:%s", version.getMavenGavVersion()),
String.format("org.wildfly:wildfly-clustering-jgroups-api:%s", version.getMavenGavVersion()),
String.format("org.wildfly:wildfly-clustering-jgroups-extension:%s", version.getMavenGavVersion()),
String.format("org.wildfly:wildfly-clustering-jgroups-spi:%s", version.getMavenGavVersion()),
"org.jgroups:jgroups:3.6.12.Final-redhat-1",};
}
}
Expand Up @@ -64,7 +64,7 @@ private static ModClusterModel getModelVersion(ModelTestControllerVersion contro
return ModClusterModel.VERSION_4_0_0;
case EAP_7_1_0:
return ModClusterModel.VERSION_5_0_0;
case EAP_7_2_0_TEMP:
case EAP_7_2_0:
return ModClusterModel.VERSION_6_0_0;
}
throw new IllegalArgumentException();
Expand All @@ -83,11 +83,11 @@ private static String[] getDependencies(ModelTestControllerVersion version) {
"org.jboss.mod_cluster:mod_cluster-core:1.3.7.Final-redhat-1",
formatArtifact("org.jboss.eap:wildfly-clustering-common:%s", version),
};
case EAP_7_2_0_TEMP:
case EAP_7_2_0:
return new String[] {
formatArtifact("org.wildfly:wildfly-mod_cluster-extension:%s", version),
formatArtifact("org.jboss.eap:wildfly-mod_cluster-extension:%s", version),
"org.jboss.mod_cluster:mod_cluster-core:1.4.0.Final",
formatArtifact("org.wildfly:wildfly-clustering-common:%s", version),
formatArtifact("org.jboss.eap:wildfly-clustering-common:%s", version),
};
}
throw new IllegalArgumentException();
Expand All @@ -110,7 +110,7 @@ public void testTransformerEAP_7_1_0() throws Exception {

@Test
public void testTransformerEAP_7_2_0() throws Exception {
this.testTransformation(ModelTestControllerVersion.EAP_7_2_0_TEMP);
this.testTransformation(ModelTestControllerVersion.EAP_7_2_0);
}

private void testTransformation(ModelTestControllerVersion controllerVersion) throws Exception {
Expand Down Expand Up @@ -159,7 +159,7 @@ public void testRejectionsEAP_7_1_0() throws Exception {

@Test
public void testRejectionsEAP_7_2_0() throws Exception {
this.testRejections(ModelTestControllerVersion.EAP_7_2_0_TEMP);
this.testRejections(ModelTestControllerVersion.EAP_7_2_0);
}

private void testRejections(ModelTestControllerVersion controllerVersion) throws Exception {
Expand Down
Expand Up @@ -55,7 +55,8 @@ private enum Version {
EAP_6_3_0(true, "6-3-0"),
EAP_6_4_0(true, "6-4-0"),
EAP_7_0_0(true, "7-0-0"),
EAP_7_1_0(true, "7-1-0");
EAP_7_1_0(true, "7-1-0"),
EAP_7_2_0(true, "7-2-0");

final boolean eap;
final String versionQualifier;
Expand Down Expand Up @@ -88,7 +89,7 @@ boolean isLessThan(int major, int minor) {

private static final Version[] EAP_VERSIONS = {
Version.EAP_6_0_0, Version.EAP_6_1_0, Version.EAP_6_2_0,
Version.EAP_6_3_0, Version.EAP_6_4_0, Version.EAP_7_0_0, Version.EAP_7_1_0};
Version.EAP_6_3_0, Version.EAP_6_4_0, Version.EAP_7_0_0, Version.EAP_7_1_0, Version.EAP_7_2_0};

private static final Version[] AS_VERSIONS = {Version.AS_7_1_3, Version.AS_7_2_0};

Expand Down