Run Wildfly integration test on CI
MODIFY
asciidoctorj-wildfly-integration-test/build.gradle
asciidoctorj-wildfly-integration-test/build.gradle
@@ -3,10 +3,13 @@ jar.enabled = false
ext {
arquillianVersion = '1.1.13.Final'
arquillianWildflyVersion = '2.1.1.Final'
+
+ wildflyVersion = '15.0.0.Final'
}
configurations {
jbossmodule
+ jbossdist { transitive = false }
}
dependencies {
@@ -19,6 +22,8 @@ dependencies {
}
jbossmodule "org.jruby:jruby-complete:$jrubyVersion"
+ jbossdist group: 'org.wildfly', name: 'wildfly-dist', version: wildflyVersion, ext: 'zip'
+
testCompile "javax:javaee-api:7.0"
testCompileOnly project(':asciidoctorj')
testCompile "junit:junit:$junitVersion"
@@ -29,6 +34,13 @@ dependencies {
testRuntime "org.wildfly.arquillian:wildfly-arquillian-container-managed:$arquillianWildflyVersion"
}
+task unpackWildfly(type: Copy) {
+ from {
+ zipTree(configurations.jbossdist.singleFile)
+ }
+ into "$buildDir"
+}
+
task createModule << {
copy {
from "src/test/resources/module.xml"
@@ -48,19 +60,7 @@ task createModule << {
test {
- useJUnit {
- excludeCategories 'org.asciidoctor.categories.Wildfly'
- }
-
-}
-
-
-test {
- useJUnit {
- if (!project.hasProperty('jboss.home')) {
- excludeCategories 'org.asciidoctor.categories.Wildfly'
- }
- }
+ useJUnit()
testLogging {
// events 'passed', 'failed', 'skipped', 'standard_out', 'standard_error'
@@ -81,12 +81,17 @@ test {
}
}
- if (project.hasProperty('jboss.home')) {
- systemProperty('jboss.home', project.getProperty("jboss.home"))
- systemProperty('module.path', project.getProperty("jboss.home") + "/modules" + File.pathSeparator + file('build/modules').absolutePath)
+ def jbossHome = file("build/wildfly-$wildflyVersion").absolutePath
+ systemProperty('jboss.home', jbossHome)
+ systemProperty('module.path', jbossHome + "/modules" + File.pathSeparator + file('build/modules').absolutePath)
+
+ if (JavaVersion.current().isJava11Compatible()) {
+ systemProperty('arquillian.launch', 'wildfly-java11')
}
+
dependsOn createModule
+ dependsOn unpackWildfly
dependsOn configurations.jbossmodule
}

MODIFY
asciidoctorj-wildfly-integration-test/src/test/resources/arquillian.xml
asciidoctorj-wildfly-integration-test/src/test/resources/arquillian.xml
<property name="jbossArguments">${jboss.args:}</property>
</configuration>
</container>
+
+ <!-- see https://issues.jboss.org/browse/MODULES-372 -->
+ <container qualifier="wildfly-java11">
+ <configuration>
+ <property name="jbossHome">${jboss.home}</property>
+ <!--<property name="javaVmArguments">-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005</property> -->
+ <property name="javaVmArguments">--add-modules java.se</property>
+ <property name="serverConfig">${jboss.server.config.file.name:standalone.xml}</property>
+ <property name="jbossArguments">${jboss.args:}</property>
+ </configuration>
+ </container>
+
</arquillian>
\ No newline at end of file

MODIFY
build.gradle
build.gradle
@@ -157,8 +157,6 @@ subprojects {
maxHeapSize = '1024m'
if (JavaVersion.current().isJava8Compatible()) {
jvmArgs '-XX:-UseGCOverheadLimit'
- } else {
- jvmArgs '-XX:MaxPermSize=256m', '-XX:-UseGCOverheadLimit'
}
testLogging {

Run Wildfly integration test on CI