Skip to content

Commit 5e59450

Browse files
committed
Merge branch 'release-5.4.0'
2 parents 856432e + 0170eab commit 5e59450

File tree

298 files changed

+36538
-27619
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

298 files changed

+36538
-27619
lines changed

CHANGELOG.md

Lines changed: 287 additions & 278 deletions
Large diffs are not rendered by default.

NOTICE.txt

Lines changed: 7369 additions & 2041 deletions
Large diffs are not rendered by default.

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ subprojects {
2525
}
2626

2727
dependencies {
28-
testCompile group: 'junit', name: 'junit', version:'4.13'
29-
testCompile group: 'xmlunit', name: 'xmlunit', version:'1.6'
28+
testImplementation group: 'junit', name: 'junit', version:'4.13'
29+
testImplementation group: 'xmlunit', name: 'xmlunit', version:'1.6'
3030
compileOnly group: 'org.apache.commons', name: 'commons-lang3', version:'3.10'
3131
compileOnly group: 'org.apache.httpcomponents', name: 'httpclient', version:'4.5.12'
3232
}
@@ -37,6 +37,6 @@ subprojects {
3737
}
3838
}
3939

40-
task wrapper(type: Wrapper) {
41-
gradleVersion = '4.10.2'
40+
task gradleWrapper(type: Wrapper) {
41+
gradleVersion = '6.7'
4242
}

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
group=com.marklogic
2-
version=5.3.2
3-
releaseVersion=5.3.2
2+
version=5.4.0
3+
releaseVersion=5.4.0
44
describedName=MarkLogic Java Client API
55
publishUrl=file:../marklogic-java/releases

gradle/wrapper/gradle-wrapper.jar

-556 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

gradlew

Lines changed: 19 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 17 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 41 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,41 @@
1-
test {
2-
testLogging{
3-
events 'started','passed', 'skipped'
4-
}
5-
/* For use in testing TestDatabaseClientKerberosFromFile */
6-
systemProperty "keytabFile", System.getProperty("keytabFile")
7-
systemProperty "principal", System.getProperty("principal")
8-
9-
exclude 'com/marklogic/client/functionaltest/TestSSLConnection.class'
10-
exclude 'com/marklogic/client/functionaltest/TestBug18993.class'
11-
exclude 'com/marklogic/client/functionaltest/TestDatabaseClientWithKerberos.class'
12-
exclude 'com/marklogic/client/functionaltest/TestDatabaseClientKerberosFromFile.class'
13-
exclude 'com/marklogic/client/functionaltest/TestDatabaseClientWithCertBasedAuth.class'
14-
exclude 'com/marklogic/client/functionaltest/TestSandBox.class'
15-
}
16-
17-
/* The minimal number of tests that run in a sandbox environment */
18-
19-
task testSandbox(type:Test) {
20-
include 'com/marklogic/client/functionaltest/TestSandBox.class'
21-
}
22-
23-
/* The code repositories to consult for dependencies */
24-
25-
repositories {
26-
maven {url "http://distro.marklogic.com/nexus/repository/maven-snapshots" }
27-
maven { url "http://developer.marklogic.com/maven2" }
28-
}
29-
30-
dependencies {
31-
compile project (':marklogic-client-api')
32-
compile group: 'org.skyscreamer', name: 'jsonassert', version: '1.5.0'
33-
compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.0'
34-
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.0'
35-
compile group: 'org.slf4j', name: 'slf4j-api', version:'1.7.25'
36-
testCompile group: 'ch.qos.logback', name: 'logback-classic', version:'1.2.3'
37-
compile group: 'commons-io', name: 'commons-io', version: '2.6'
38-
}
1+
test {
2+
testLogging{
3+
events 'started','passed', 'skipped'
4+
}
5+
/* For use in testing TestDatabaseClientKerberosFromFile */
6+
systemProperty "keytabFile", System.getProperty("keytabFile")
7+
systemProperty "principal", System.getProperty("principal")
8+
9+
exclude 'com/marklogic/client/functionaltest/TestSSLConnection.class'
10+
exclude 'com/marklogic/client/functionaltest/TestBug18993.class'
11+
exclude 'com/marklogic/client/functionaltest/TestDatabaseClientWithKerberos.class'
12+
exclude 'com/marklogic/client/functionaltest/TestDatabaseClientKerberosFromFile.class'
13+
exclude 'com/marklogic/client/functionaltest/TestDatabaseClientWithCertBasedAuth.class'
14+
exclude 'com/marklogic/client/functionaltest/TestSandBox.class'
15+
}
16+
17+
/* The minimal number of tests that run in a sandbox environment */
18+
19+
task testSandbox(type:Test) {
20+
include 'com/marklogic/client/functionaltest/TestSandBox.class'
21+
}
22+
23+
/* The code repositories to consult for dependencies */
24+
25+
repositories {
26+
maven {url "http://distro.marklogic.com/nexus/repository/maven-snapshots" }
27+
maven { url "http://developer.marklogic.com/maven2" }
28+
}
29+
30+
dependencies {
31+
implementation project (':marklogic-client-api')
32+
implementation group: 'org.skyscreamer', name: 'jsonassert', version: '1.5.0'
33+
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.0'
34+
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.0'
35+
implementation group: 'org.slf4j', name: 'slf4j-api', version:'1.7.25'
36+
testImplementation group: 'ch.qos.logback', name: 'logback-classic', version:'1.2.3'
37+
implementation group: 'commons-io', name: 'commons-io', version: '2.6'
38+
implementation group: 'com.squareup.okhttp3', name: 'okhttp', version:'4.7.2'
39+
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version:'2.11.1'
40+
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version:'2.11.1'
41+
}

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/datamovement/functionaltests/DeleteListenerTest.java

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -183,18 +183,17 @@ public void tearDown() throws Exception {
183183

184184
@Test
185185
public void massDeleteSingleThread() throws Exception {
186-
Set<String> uriSet = new HashSet<>();
186+
HashSet<String> urisList = new HashSet<>();
187187

188-
Assert.assertTrue(uriSet.isEmpty());
188+
Assert.assertTrue(urisList.isEmpty());
189189
Assert.assertTrue(dbClient.newServerEval().xquery(query1).eval().next().getNumber().intValue() == 2000);
190190

191191
QueryBatcher queryBatcher = dmManager.newQueryBatcher(new StructuredQueryBuilder().collection("DeleteListener"))
192-
.withBatchSize(11)
193-
.withThreadCount(1)
192+
.withBatchSize(11, 1)
193+
//.withThreadCount(1)
194194
.onUrisReady(batch -> {
195-
for (String s : batch.getItems()) {
196-
uriSet.add(s);
197-
195+
synchronized (this) {
196+
urisList.addAll(Arrays.asList(batch.getItems()));
198197
}
199198
})
200199
.onQueryFailure(throwable -> {
@@ -208,13 +207,13 @@ public void massDeleteSingleThread() throws Exception {
208207
dmManager.stopJob(ticket);
209208

210209
Thread.currentThread().sleep(2000L);
211-
Assert.assertTrue(uriSet.size() == 2000);
210+
Assert.assertTrue(urisList.size() == 2000);
212211

213212
AtomicInteger successDocs = new AtomicInteger();
214213
HashSet<String> uris2 = new HashSet<>();
215214
StringBuffer failures2 = new StringBuffer();
216215

217-
QueryBatcher deleteBatcher = dmManager.newQueryBatcher(uriSet.iterator())
216+
QueryBatcher deleteBatcher = dmManager.newQueryBatcher(urisList.iterator())
218217
.withBatchSize(23)
219218
.withThreadCount(1)
220219
.onUrisReady(new DeleteListener())
@@ -365,7 +364,7 @@ public void run() {
365364
Thread t1;
366365
t1 = new Thread(new MyRunnable());
367366

368-
HashSet<String> urisList = new HashSet<>();
367+
Set<String> urisList = Collections.synchronizedSet(new HashSet<>());
369368

370369
QueryBatcher queryBatcher = dmManager.newQueryBatcher(
371370
new StructuredQueryBuilder().collection("DeleteListener"))
@@ -392,7 +391,7 @@ public void run() {
392391

393392
System.out.println("URI's size " + urisList.size());
394393
AtomicInteger successDocs = new AtomicInteger();
395-
HashSet<String> uris2 = new HashSet<>();
394+
Set<String> uris2 = Collections.synchronizedSet(new HashSet<>());
396395
StringBuffer failures2 = new StringBuffer();
397396

398397
QueryBatcher deleteBatcher = dmManager.newQueryBatcher(urisList.iterator())
@@ -645,7 +644,7 @@ public void deleteOnDiskUris() throws Exception {
645644

646645
public ArrayList<String> getUris() {
647646

648-
Set<String> uris = new HashSet<>();
647+
Set<String> uris = Collections.synchronizedSet(new HashSet<>());
649648

650649
QueryBatcher getUris = dmManager.newQueryBatcher(new StructuredQueryBuilder().collection("DeleteListener"))
651650
.withBatchSize(5000)
@@ -658,7 +657,7 @@ public ArrayList<String> getUris() {
658657
}
659658

660659
public ArrayList<String> writeUrisToDisk() throws IOException {
661-
Set<String> uris = new HashSet<>();
660+
Set<String> uris = Collections.synchronizedSet(new HashSet<>());
662661

663662
FileWriter writer = new FileWriter("uriCache.txt");
664663
QueryBatcher getUris = dmManager.newQueryBatcher(new StructuredQueryBuilder().collection("DeleteListener"))

0 commit comments

Comments
 (0)