Skip to content

Commit a492e97

Browse files
committed
Adding the suggestions.
1 parent b0856f9 commit a492e97

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

marklogic-client-api/src/test/java/com/marklogic/client/test/dataservices/BulkOutputCallerNext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public static void setup() throws Exception {
4343
@Test
4444
public void bulkOutputCallerNextTest() throws Exception {
4545
String endpointState = "{\"next\":"+1+"}";
46-
String workUnit = "{\"max\":"+5+"}";
46+
String workUnit = "{\"limit\":"+5+"}";
4747

4848
IOTestUtil.writeDocuments(10,collectionName);
4949

marklogic-client-api/src/test/resources/dataservices/bulkOutputCallerNext.sjs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22

33
const state = fn.head(xdmp.fromJSON(endpointState));
44
const work = fn.head(xdmp.fromJSON(workUnit));
5-
const limit = fn.head(xdmp.fromJSON(workUnit));
65

76
const res = [];
8-
const d = fn.subsequence(fn.collection("bulkOutputCallerNext"), state.next, limit.max);
7+
const d = fn.subsequence(fn.collection("bulkOutputCallerNext"), state.next, work.limit);
98
res.push(state);
109
for (const x of d) {
1110
res.push(x); };
12-
state.next = state.next + work.max;
13-
limit.max = limit.max + work.max;
11+
state.next = state.next + work.limit;
1412

1513
const returnValue = Sequence.from(res);
1614

0 commit comments

Comments
 (0)