Skip to content

Commit cce33e0

Browse files
committed
Final cleanup.
1 parent 6efec98 commit cce33e0

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed

marklogic-client-api/src/main/java/com/marklogic/client/dataservices/impl/CallBatcherImpl.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import org.slf4j.Logger;
3131
import org.slf4j.LoggerFactory;
3232

33-
import java.text.SimpleDateFormat;
3433
import java.util.*;
3534
import java.util.concurrent.*;
3635
import java.util.concurrent.atomic.AtomicBoolean;

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

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -99,22 +99,18 @@ public static void setup() {
9999
@Test
100100
public void forArgsGeneratorTest() {
101101
List<Double> outputValues = new ArrayList<Double>();
102+
final List<Double> inputValues = Stream
103+
.iterate(10.0, last -> last - Double.valueOf(1))
104+
.limit(10)
105+
.collect(Collectors.toList());
106+
Collections.sort(inputValues);
102107
class Output {
103-
List<Double> inputValues = new ArrayList<Double>();
104-
int i;
105-
Output() {
106-
inputValues = Stream
107-
.iterate(10.0, last -> last - Double.valueOf(1))
108-
.limit(10)
109-
.collect(Collectors.toList());
110-
Collections.sort(inputValues);
111-
i = 0;
112-
}
108+
int i = 0;
113109
}
114110
final Output output = new Output();
115111
batcher = caller
116112
.batcher()
117-
.forArgsGenerator(result -> (result == null || output.i<output.inputValues.size()) ? caller.args().param("param1", output.inputValues.get(output.i)) : null)
113+
.forArgsGenerator(result -> (result == null || output.i<inputValues.size()) ? caller.args().param("param1", inputValues.get(output.i)) : null)
118114
.onCallSuccess(event -> {
119115
output.i+= 1;
120116
outputValues.add(event.getItem());
@@ -125,7 +121,7 @@ class Output {
125121
batcher.awaitCompletion();
126122
batcher.stopJob();
127123
Collections.sort(outputValues);
128-
assertEquals("forArgsGenerator input not equal to output.", outputValues, output.inputValues);
124+
assertEquals("forArgsGenerator input not equal to output.", outputValues, inputValues);
129125
}
130126

131127
@Test

0 commit comments

Comments
 (0)