Skip to content

Commit 438a034

Browse files
llingllinggit
authored andcommitted
test cleanup - forest count in cluster environment, #1196
1 parent 603cec8 commit 438a034

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

marklogic-client-api/src/test/java/com/marklogic/client/test/document/DocumentWriteOperationTest.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
package com.marklogic.client.test.document;
1717

18+
import com.marklogic.client.datamovement.DataMovementManager;
19+
import com.marklogic.client.datamovement.ForestConfiguration;
1820
import com.marklogic.client.document.*;
1921
import com.marklogic.client.io.DocumentMetadataHandle;
2022
import com.marklogic.client.io.Format;
@@ -322,7 +324,11 @@ public void DocumentQueryWithForest() {
322324
textDocumentManager.write(batch);
323325
StructuredQueryDefinition query = new StructuredQueryBuilder().collection(collectionName);
324326

325-
int forestCount = 3;
327+
int forestCount;
328+
DataMovementManager moveMgr = Common.client.newDataMovementManager();
329+
ForestConfiguration forest = moveMgr.readForestConfig();
330+
forestCount = forest.listForests().length;
331+
326332
DocumentPage[] documents = new DocumentPage[forestCount];
327333
ArrayList<Set<String>> sets = new ArrayList<Set<String>>();
328334

0 commit comments

Comments
 (0)