Skip to content

Commit d92930e

Browse files
committed
MLE-26420 Bumping dependencies and adding marklogic-junit5
In the next PR, will use marklogic-junit5 to make "real" tests that clear out all data except "test-data" documents.
1 parent 823409d commit d92930e

File tree

12 files changed

+40
-25
lines changed

12 files changed

+40
-25
lines changed

.copyrightconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ startyear: 2010
1111
# - Dotfiles already skipped automatically
1212
# Enable by removing the leading '# ' from the next line and editing values.
1313
# filesexcluded: third_party/*, docs/generated/*.md, assets/*.png, scripts/temp_*.py, vendor/lib.js
14-
filesexcluded: .github/*, README.md, Jenkinsfile, gradle/*, docker-compose.yaml, docker-compose.yml, *.gradle, gradle.properties, gradlew, gradlew.bat, **/test/resources/**, *.md, pom.xml
14+
filesexcluded: .github/*, README.md, Jenkinsfile, gradle/*, docker-compose.yaml, docker-compose.yml, *.gradle, gradle.properties, gradlew, gradlew.bat, **/test/resources/**, *.md, pom.xml, *.properties

build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ subprojects {
2525
repositories {
2626
mavenCentral()
2727

28+
mavenLocal()
29+
2830
// Needed so that ml-development-tools can resolve snapshots of marklogic-client-api.
2931
maven {
3032
url = "https://bed-artifactory.bedford.progress.com:443/artifactory/ml-maven-snapshots/"

gradle.properties

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ group=com.marklogic
22
version=8.0-SNAPSHOT
33
publishUrl=file:../marklogic-java/releases
44

5-
okhttpVersion=5.2.0
5+
okhttpVersion=5.3.2
66

77
# See https://github.com/FasterXML/jackson for more information on the Jackson libraries.
8-
jacksonVersion=2.20.0
8+
jacksonVersion=2.20.1
9+
10+
junitVersion=6.0.1
911

1012
# Defined at this level so that they can be set as system properties and used by the marklogic-client-api and test-app
1113
# project

marklogic-client-api-functionaltests/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,23 @@ dependencies {
77
testImplementation "jakarta.xml.bind:jakarta.xml.bind-api:4.0.4"
88
testImplementation 'org.skyscreamer:jsonassert:1.5.3'
99
testImplementation 'org.slf4j:slf4j-api:2.0.17'
10-
testImplementation 'commons-io:commons-io:2.20.0'
10+
testImplementation 'commons-io:commons-io:2.21.0'
1111
testImplementation "com.squareup.okhttp3:okhttp:${okhttpVersion}"
1212
testImplementation "com.fasterxml.jackson.core:jackson-core:${jacksonVersion}"
1313
testImplementation "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}"
1414
testImplementation "org.jdom:jdom2:2.0.6.1"
1515

16-
testImplementation 'org.apache.commons:commons-lang3:3.19.0'
16+
testImplementation 'org.apache.commons:commons-lang3:3.20.0'
1717

1818
testImplementation "com.marklogic:ml-app-deployer:6.2-SNAPSHOT"
1919

2020
testImplementation 'ch.qos.logback:logback-classic:1.5.19'
21-
testImplementation 'org.junit.jupiter:junit-jupiter:5.14.0'
22-
testImplementation 'org.xmlunit:xmlunit-legacy:2.10.4'
21+
testImplementation "org.junit.jupiter:junit-jupiter:${junitVersion}"
22+
testImplementation 'org.xmlunit:xmlunit-legacy:2.11.0'
2323

2424
// Without this, once using JUnit 5.12 or higher, Gradle will not find any tests and report an error of:
2525
// org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to discover tests
26-
testRuntimeOnly "org.junit.platform:junit-platform-launcher:1.14.0"
26+
testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junitVersion}"
2727
}
2828

2929
tasks.withType(Test).configureEach {

marklogic-client-api/build.gradle

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ plugins {
66
id 'maven-publish'
77
}
88

9+
configurations.all {
10+
// Ensure that no test dependencies below, namely marklogic-junit5, bring in their own version of marklogic-client-api,
11+
// as we only want to use the one built by this project.
12+
exclude group: 'com.marklogic', module: 'marklogic-client-api'
13+
}
14+
915
dependencies {
1016
// Using the latest version now that the 8.0.0 release requires Java 17.
1117
// This is now an implementation dependency as opposed to an api dependency in 7.x and earlier.
@@ -36,23 +42,23 @@ dependencies {
3642
compileOnly 'org.dom4j:dom4j:2.2.0'
3743
compileOnly 'com.google.code.gson:gson:2.13.2'
3844

39-
testImplementation 'org.junit.jupiter:junit-jupiter:5.14.0'
45+
testImplementation "com.marklogic:marklogic-junit5:2.0-SNAPSHOT"
4046

41-
testImplementation 'org.xmlunit:xmlunit-legacy:2.10.4'
47+
testImplementation 'org.xmlunit:xmlunit-legacy:2.11.0'
4248
testImplementation project(':examples')
4349

44-
testImplementation 'org.apache.commons:commons-lang3:3.19.0'
50+
testImplementation 'org.apache.commons:commons-lang3:3.20.0'
4551

4652
// Allows talking to the Manage API.
4753
testImplementation "com.marklogic:ml-app-deployer:6.2-SNAPSHOT"
4854

49-
testImplementation "org.mockito:mockito-core:5.20.0"
55+
testImplementation "org.mockito:mockito-core:5.21.0"
5056
testImplementation "org.mockito:mockito-inline:5.2.0"
5157

52-
testImplementation "com.squareup.okhttp3:mockwebserver3:5.2.0"
58+
testImplementation "com.squareup.okhttp3:mockwebserver3:${okhttpVersion}"
5359

5460
testImplementation "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${jacksonVersion}"
55-
testImplementation 'ch.qos.logback:logback-classic:1.5.19'
61+
testImplementation 'ch.qos.logback:logback-classic:1.5.23'
5662

5763
// Using this to avoid a schema validation issue with the regular xercesImpl
5864
testImplementation 'org.opengis.cite.xerces:xercesImpl-xsd11:2.12-beta-r1667115'
@@ -69,7 +75,7 @@ dependencies {
6975
// https://docs.gradle.org/current/userguide/upgrading_version_8.html#test_framework_implementation_dependencies
7076
// Without this, once using JUnit 5.12 or higher, Gradle will not find any tests and report an error of:
7177
// org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to discover tests
72-
testRuntimeOnly "org.junit.platform:junit-platform-launcher:1.14.0"
78+
testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junitVersion}"
7379
}
7480

7581
// Ensure that mlHost and mlPassword can override the defaults of localhost/admin if they've been modified

marklogic-client-api/src/test/java/com/marklogic/client/test/ssl/SSLTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public void testSSLAuth() throws NoSuchAlgorithmException, KeyManagementExceptio
8181

8282
@Test
8383
// Not able to mock the X509Certificate class on Java 21.
84-
@EnabledOnJre({JRE.JAVA_8, JRE.JAVA_11, JRE.JAVA_17})
84+
@EnabledOnJre({JRE.JAVA_17})
8585
public void testHostnameVerifier() throws SSLException, CertificateParsingException {
8686
// three things our SSLHostnameVerifier will capture
8787
AtomicReference<String> capturedHost = new AtomicReference<>();

test-app/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
buildscript {
66
repositories {
77
mavenCentral()
8+
9+
mavenLocal()
10+
811
// Needed for ml-gradle 6.2-SNAPSHOT
912
maven {
1013
url = "https://bed-artifactory.bedford.progress.com:443/artifactory/ml-maven-snapshots/"
@@ -26,7 +29,7 @@ dependencies {
2629
implementation "io.undertow:undertow-core:2.3.20.Final"
2730
implementation "io.undertow:undertow-servlet:2.3.20.Final"
2831
implementation 'org.slf4j:slf4j-api:2.0.17'
29-
implementation 'ch.qos.logback:logback-classic:1.5.19'
32+
implementation 'ch.qos.logback:logback-classic:1.5.23'
3033
implementation "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}"
3134
implementation "com.squareup.okhttp3:okhttp:${okhttpVersion}"
3235
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
*=/optic/test,/optic/music
1+
*=/optic/test,/optic/music,test-data
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*=test-data
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
*=zipcode
1+
*=zipcode,test-data

0 commit comments

Comments
 (0)