Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 21 additions & 19 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,9 @@ pipeline{
export PATH=$GRADLE_USER_HOME:$JAVA_HOME/bin:$PATH
cd java-client-api
./gradlew cleanTest marklogic-client-api:test
./gradlew -PtestUseReverseProxyServer=true test-app:runReverseProxyServer marklogic-client-api-functionaltests:runFastFunctionalTests || true
'''
// Omitting this until MLE-24523 can be addressed
// ./gradlew -PtestUseReverseProxyServer=true test-app:runReverseProxyServer marklogic-client-api-functionaltests:runFastFunctionalTests || true
junit '**/build/**/TEST*.xml'
}
post {
Expand Down Expand Up @@ -222,24 +223,25 @@ pipeline{
}
}

stage('regressions-11-reverseProxy') {
when {
allOf {
branch 'develop'
expression {return params.regressions}
}
}
steps {
runTestsWithReverseProxy("ml-docker-db-dev-tierpoint.bed-artifactory.bedford.progress.com/marklogic/marklogic-server-ubi:latest-11")
junit '**/build/**/TEST*.xml'
}
post {
always {
updateWorkspacePermissions()
tearDownDocker()
}
}
}
// Omitting this until MLE-24523 can be addressed
// stage('regressions-11-reverseProxy') {
// when {
// allOf {
// branch 'develop'
// expression {return params.regressions}
// }
// }
// steps {
// runTestsWithReverseProxy("ml-docker-db-dev-tierpoint.bed-artifactory.bedford.progress.com/marklogic/marklogic-server-ubi:latest-11")
// junit '**/build/**/TEST*.xml'
// }
// post {
// always {
// updateWorkspacePermissions()
// tearDownDocker()
// }
// }
// }

stage('regressions-12') {
when {
Expand Down
14 changes: 8 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
subprojects {
apply plugin: 'java-library'

tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.compilerArgs += ["-Xlint:unchecked", "-Xlint:deprecation"]
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
Expand All @@ -32,12 +27,19 @@ subprojects {
mavenCentral()
}

test {
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.compilerArgs += ["-Xlint:unchecked", "-Xlint:deprecation"]
}

tasks.withType(Test).configureEach {
useJUnitPlatform()
testLogging {
events = ['started', 'passed', 'skipped', 'failed']
exceptionFormat = 'full'
}

// Will remove this in a future PR to determine if they're needed or not.
systemProperty "file.encoding", "UTF-8"
systemProperty "javax.xml.stream.XMLOutputFactory", "com.sun.xml.internal.stream.XMLOutputFactoryImpl"
}
Expand Down
25 changes: 14 additions & 11 deletions marklogic-client-api-functionaltests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@
* Copyright (c) 2010-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
*/

test {
// For use in testing TestDatabaseClientKerberosFromFile
systemProperty "keytabFile", System.getProperty("keytabFile")
systemProperty "principal", System.getProperty("principal")

systemProperty "TEST_USE_REVERSE_PROXY_SERVER", testUseReverseProxyServer
}

dependencies {
testImplementation project(':marklogic-client-api')
testImplementation "jakarta.xml.bind:jakarta.xml.bind-api:4.0.4"
Expand Down Expand Up @@ -37,20 +29,30 @@ dependencies {
testRuntimeOnly "org.junit.platform:junit-platform-launcher:1.13.4"
}

tasks.withType(Test).configureEach {
// For use in testing TestDatabaseClientKerberosFromFile
systemProperty "keytabFile", System.getProperty("keytabFile")
systemProperty "principal", System.getProperty("principal")

systemProperty "TEST_USE_REVERSE_PROXY_SERVER", testUseReverseProxyServer
}

tasks.register("runFragileTests", Test) {
useJUnitPlatform()
description = "These are called 'fragile' because they'll pass when run by themselves, but when run as part of the " +
"full suite, there seem to be one or more other fast functional tests that run before them and cause some of " +
"their test methods to break. The Jenkinsfile thus calls these first before running the other functional " +
"tests."
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath
include "com/marklogic/client/fastfunctest/TestQueryOptionBuilder.class"
include "com/marklogic/client/fastfunctest/TestRawCombinedQuery.class"
include "com/marklogic/client/fastfunctest/TestRawStructuredQuery.class"
}

tasks.register("runFastFunctionalTests", Test) {
useJUnitPlatform()
description = "Run all fast functional tests that don't setup/teardown custom app servers / databases"
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath
include "com/marklogic/client/fastfunctest/**"
// Exclude the "fragile" ones
exclude "com/marklogic/client/fastfunctest/TestQueryOptionBuilder.class"
Expand All @@ -59,8 +61,9 @@ tasks.register("runFastFunctionalTests", Test) {
}

tasks.register("runSlowFunctionalTests", Test) {
useJUnitPlatform()
description = "Run slow functional tests; i.e. those that setup/teardown custom app servers / databases"
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath
include "com/marklogic/client/datamovement/functionaltests/**"
include "com/marklogic/client/functionaltest/**"
}
Expand Down
9 changes: 5 additions & 4 deletions marklogic-client-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ dependencies {
}

// Ensure that mlHost and mlPassword can override the defaults of localhost/admin if they've been modified
test {
useJUnitPlatform()
tasks.withType(Test).configureEach {
systemProperty "TEST_HOST", mlHost
systemProperty "TEST_ADMIN_PASSWORD", mlPassword
// Needed by the tests for the example programs
Expand All @@ -88,8 +87,9 @@ test {
}

tasks.register("testRows", Test) {
useJUnitPlatform()
description = "Run all 'rows' tests; i.e. those exercising Optic and Optic Update functionality"
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath
include "com/marklogic/client/test/rows/**"
}

Expand All @@ -101,8 +101,9 @@ tasks.register("debugCloudAuth", JavaExec) {
}

tasks.register("runXmlSmokeTests", Test) {
useJUnitPlatform()
description = "Run a bunch of XML-related tests for smoke-testing on a particular JVM"
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath
include "com/marklogic/client/test/BufferableHandleTest.class"
include "com/marklogic/client/test/EvalTest.class"
include "com/marklogic/client/test/HandleAsTest.class"
Expand Down