Skip to content

Commit 5629291

Browse files
committed
MLE-23230 Using retry interceptor from the Java Client
1 parent 920c460 commit 5629291

File tree

4 files changed

+12
-87
lines changed

4 files changed

+12
-87
lines changed

ml-app-deployer/build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ dependencies {
77
// For wrangling JSON.
88
api "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}"
99

10+
// For compiling JAXB code; marklogic-client-api brings this in at runtime.
11+
compileOnly "jakarta.xml.bind:jakarta.xml.bind-api:4.0.4"
12+
1013
// For resolving XPath expressions against XML documents.
1114
implementation 'jaxen:jaxen:2.0.0'
1215

@@ -26,6 +29,9 @@ dependencies {
2629
exclude module: "jackson-databind"
2730
}
2831

32+
// Need this for compiling tests too.
33+
testCompileOnly "jakarta.xml.bind:jakarta.xml.bind-api:4.0.4"
34+
2935
testImplementation 'commons-io:commons-io:2.19.0'
3036
testImplementation 'xmlunit:xmlunit:1.6'
3137

ml-app-deployer/src/test/java/com/marklogic/rest/util/RetryInterceptor.java

Lines changed: 0 additions & 85 deletions
This file was deleted.

ml-app-deployer/src/test/java/com/marklogic/rest/util/TestConfig.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*/
44
package com.marklogic.rest.util;
55

6+
import com.marklogic.client.impl.okhttp.RetryIOExceptionInterceptor;
67
import com.marklogic.mgmt.DefaultManageConfigFactory;
78
import com.marklogic.mgmt.ManageConfig;
89
import com.marklogic.mgmt.admin.AdminConfig;
@@ -75,7 +76,7 @@ public ManageConfig manageConfig() {
7576
config.setCleanJsonPayloads(true);
7677

7778
config.setClientConfigurator(builder ->
78-
builder.addInterceptor(new com.marklogic.rest.util.RetryInterceptor(3, 1000, 2, 5000)));
79+
builder.addInterceptor(new RetryIOExceptionInterceptor(3, 1000, 2, 5000)));
7980

8081
return config;
8182
}

ml-javaclient-util/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dependencies {
2-
api 'com.marklogic:marklogic-client-api:7.2.0'
2+
api 'com.marklogic:marklogic-client-api:8.0-SNAPSHOT'
33
api 'com.marklogic:marklogic-xcc:12.0.0'
44

55
// API dependency as some Spring classes, like Resource, are used throughout this project.
@@ -11,6 +11,9 @@ dependencies {
1111
implementation 'org.jdom:jdom2:2.0.6.1'
1212
implementation "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}"
1313

14+
// For compiling JAXB code; marklogic-client-api brings this in at runtime.
15+
testCompileOnly "jakarta.xml.bind:jakarta.xml.bind-api:4.0.4"
16+
1417
testImplementation 'org.mockito:mockito-core:4.11.0'
1518
// Used for testing loading modules from the classpath
1619
testImplementation files("lib/modules.jar")

0 commit comments

Comments
 (0)