Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Commit f51f69d

Browse files
committed
#285 Fix for DeleteCollectionsJob
1 parent 396f75c commit f51f69d

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

src/main/java/com/marklogic/client/ext/datamovement/job/DeleteCollectionsJob.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public class DeleteCollectionsJob extends AbstractQueryBatcherJob {
1212

1313
public DeleteCollectionsJob() {
1414
super();
15+
setRequireWhereProperty(false);
1516
addRequiredJobProperty("collections", "Comma-delimited list of collections to delete",
1617
value -> setCollections(value.split(",")));
1718
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package com.marklogic.client.ext.datamovement.job;
2+
3+
import com.marklogic.client.ext.datamovement.AbstractDataMovementTest;
4+
import org.junit.Test;
5+
6+
import java.util.List;
7+
import java.util.Properties;
8+
9+
public class DeleteCollectionsTest extends AbstractDataMovementTest {
10+
11+
@Test
12+
public void test() {
13+
Properties props = new Properties();
14+
props.setProperty("collections", COLLECTION);
15+
16+
DeleteCollectionsJob job = new DeleteCollectionsJob();
17+
List<String> messages = job.configureJob(props);
18+
assertTrue("This job doesn't require where* properties to be set", messages.isEmpty());
19+
20+
job.run(client);
21+
}
22+
}

0 commit comments

Comments
 (0)