ParallelStreamCollector.java

1
package com.pivovarit.collectors;
2
3
import java.util.ArrayList;
4
import java.util.Collection;
5
import java.util.EnumSet;
6
import java.util.List;
7
import java.util.Set;
8
import java.util.concurrent.CompletableFuture;
9
import java.util.concurrent.Executor;
10
import java.util.function.BiConsumer;
11
import java.util.function.BinaryOperator;
12
import java.util.function.Function;
13
import java.util.function.Supplier;
14
import java.util.stream.Collector;
15
import java.util.stream.Stream;
16
17
import static com.pivovarit.collectors.BatchingSpliterator.batching;
18
import static com.pivovarit.collectors.BatchingSpliterator.partitioned;
19
import static com.pivovarit.collectors.CompletionStrategy.ordered;
20
import static com.pivovarit.collectors.CompletionStrategy.unordered;
21
import static com.pivovarit.collectors.Preconditions.requireValidExecutor;
22
import static com.pivovarit.collectors.Preconditions.requireValidParallelism;
23
import static java.util.Collections.emptySet;
24
import static java.util.Objects.requireNonNull;
25
import static java.util.stream.Collectors.collectingAndThen;
26
import static java.util.stream.Collectors.toList;
27
28
/**
29
 * @author Grzegorz Piwowarek
30
 */
31
class ParallelStreamCollector<T, R> implements Collector<T, List<CompletableFuture<R>>, Stream<R>> {
32
33
    private static final EnumSet<Characteristics> UNORDERED = EnumSet.of(Characteristics.UNORDERED);
34
35
    private final Function<T, R> function;
36
37
    private final CompletionStrategy<R> completionStrategy;
38
39
    private final Set<Characteristics> characteristics;
40
41
    private final Dispatcher<R> dispatcher;
42
43
    private ParallelStreamCollector(
44
      Function<T, R> function,
45
      CompletionStrategy<R> completionStrategy,
46
      Set<Characteristics> characteristics,
47
      Dispatcher<R> dispatcher) {
48
        this.completionStrategy = completionStrategy;
49
        this.characteristics = characteristics;
50
        this.dispatcher = dispatcher;
51
        this.function = function;
52
    }
53
54
    @Override
55
    public Supplier<List<CompletableFuture<R>>> supplier() {
56 1 1. supplier : replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector::supplier → KILLED
        return ArrayList::new;
57
    }
58
59
    @Override
60
    public BiConsumer<List<CompletableFuture<R>>, T> accumulator() {
61 1 1. accumulator : replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector::accumulator → KILLED
        return (acc, e) -> {
62 1 1. lambda$accumulator$1 : removed call to com/pivovarit/collectors/Dispatcher::start → TIMED_OUT
            dispatcher.start();
63 1 1. lambda$accumulator$0 : replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector::lambda$accumulator$0 → KILLED
            acc.add(dispatcher.enqueue(() -> function.apply(e)));
64
        };
65
    }
66
67
    @Override
68
    public BinaryOperator<List<CompletableFuture<R>>> combiner() {
69 1 1. combiner : replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector::combiner → SURVIVED
        return (left, right) -> {
70
            throw new UnsupportedOperationException(
71
              "Using parallel stream with parallel collectors is a bad idea");
72
        };
73
    }
74
75
    @Override
76
    public Function<List<CompletableFuture<R>>, Stream<R>> finisher() {
77 1 1. finisher : replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector::finisher → KILLED
        return acc -> {
78 1 1. lambda$finisher$3 : removed call to com/pivovarit/collectors/Dispatcher::stop → SURVIVED
            dispatcher.stop();
79 1 1. lambda$finisher$3 : replaced return value with Stream.empty for com/pivovarit/collectors/ParallelStreamCollector::lambda$finisher$3 → KILLED
            return completionStrategy.apply(acc);
80
        };
81
    }
82
83
    @Override
84
    public Set<Characteristics> characteristics() {
85 1 1. characteristics : replaced return value with Collections.emptySet for com/pivovarit/collectors/ParallelStreamCollector::characteristics → SURVIVED
        return characteristics;
86
    }
87
88
    static <T, R> Collector<T, ?, Stream<R>> streaming(Function<T, R> mapper) {
89
        requireNonNull(mapper, "mapper can't be null");
90
91 1 1. streaming : replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector::streaming → KILLED
        return new ParallelStreamCollector<>(mapper, unordered(), UNORDERED, Dispatcher.virtual());
92
    }
93
94
    static <T, R> Collector<T, ?, Stream<R>> streaming(Function<T, R> mapper, int parallelism) {
95
        requireNonNull(mapper, "mapper can't be null");
96 1 1. streaming : removed call to com/pivovarit/collectors/Preconditions::requireValidParallelism → TIMED_OUT
        requireValidParallelism(parallelism);
97
98 1 1. streaming : replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector::streaming → KILLED
        return new ParallelStreamCollector<>(mapper, unordered(), UNORDERED, Dispatcher.virtual(parallelism));
99
    }
100
101
    static <T, R> Collector<T, ?, Stream<R>> streaming(Function<T, R> mapper, Executor executor) {
102
        requireNonNull(executor, "executor can't be null");
103
        requireNonNull(mapper, "mapper can't be null");
104 1 1. streaming : removed call to com/pivovarit/collectors/Preconditions::requireValidExecutor → SURVIVED
        requireValidExecutor(executor);
105
106 1 1. streaming : replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector::streaming → KILLED
        return new ParallelStreamCollector<>(mapper, unordered(), UNORDERED, Dispatcher.from(executor));
107
    }
108
109
    static <T, R> Collector<T, ?, Stream<R>> streaming(Function<T, R> mapper, Executor executor, int parallelism) {
110
        requireNonNull(executor, "executor can't be null");
111
        requireNonNull(mapper, "mapper can't be null");
112 1 1. streaming : removed call to com/pivovarit/collectors/Preconditions::requireValidParallelism → TIMED_OUT
        requireValidParallelism(parallelism);
113 1 1. streaming : removed call to com/pivovarit/collectors/Preconditions::requireValidExecutor → SURVIVED
        requireValidExecutor(executor);
114
115 1 1. streaming : replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector::streaming → KILLED
        return new ParallelStreamCollector<>(mapper, unordered(), UNORDERED, Dispatcher.from(executor, parallelism));
116
    }
117
118
    static <T, R> Collector<T, ?, Stream<R>> streamingOrdered(Function<T, R> mapper) {
119
        requireNonNull(mapper, "mapper can't be null");
120
121 1 1. streamingOrdered : replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector::streamingOrdered → KILLED
        return new ParallelStreamCollector<>(mapper, ordered(), emptySet(), Dispatcher.virtual());
122
    }
123
124
    static <T, R> Collector<T, ?, Stream<R>> streamingOrdered(Function<T, R> mapper, int parallelism) {
125
        requireNonNull(mapper, "mapper can't be null");
126 1 1. streamingOrdered : removed call to com/pivovarit/collectors/Preconditions::requireValidParallelism → TIMED_OUT
        requireValidParallelism(parallelism);
127
128 1 1. streamingOrdered : replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector::streamingOrdered → KILLED
        return new ParallelStreamCollector<>(mapper, ordered(), emptySet(), Dispatcher.virtual(parallelism));
129
    }
130
131
    static <T, R> Collector<T, ?, Stream<R>> streamingOrdered(Function<T, R> mapper, Executor executor) {
132
        requireNonNull(executor, "executor can't be null");
133
        requireNonNull(mapper, "mapper can't be null");
134 1 1. streamingOrdered : removed call to com/pivovarit/collectors/Preconditions::requireValidExecutor → SURVIVED
        requireValidExecutor(executor);
135
136 1 1. streamingOrdered : replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector::streamingOrdered → KILLED
        return new ParallelStreamCollector<>(mapper, ordered(), emptySet(), Dispatcher.from(executor));
137
    }
138
139
    static <T, R> Collector<T, ?, Stream<R>> streamingOrdered(Function<T, R> mapper, Executor executor, int parallelism) {
140
        requireNonNull(executor, "executor can't be null");
141
        requireNonNull(mapper, "mapper can't be null");
142 1 1. streamingOrdered : removed call to com/pivovarit/collectors/Preconditions::requireValidParallelism → KILLED
        requireValidParallelism(parallelism);
143 1 1. streamingOrdered : removed call to com/pivovarit/collectors/Preconditions::requireValidExecutor → SURVIVED
        requireValidExecutor(executor);
144
145 1 1. streamingOrdered : replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector::streamingOrdered → KILLED
        return new ParallelStreamCollector<>(mapper, ordered(), emptySet(), Dispatcher.from(executor, parallelism));
146
    }
147
148
    static final class BatchingCollectors {
149
150
        private BatchingCollectors() {
151
        }
152
153
        static <T, R> Collector<T, ?, Stream<R>> streaming(Function<T, R> mapper, Executor executor, int parallelism) {
154
            requireNonNull(executor, "executor can't be null");
155
            requireNonNull(mapper, "mapper can't be null");
156 1 1. streaming : removed call to com/pivovarit/collectors/Preconditions::requireValidParallelism → KILLED
            requireValidParallelism(parallelism);
157 1 1. streaming : removed call to com/pivovarit/collectors/Preconditions::requireValidExecutor → KILLED
            requireValidExecutor(executor);
158
159 2 1. streaming : negated conditional → KILLED
2. streaming : replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector$BatchingCollectors::streaming → KILLED
            return parallelism == 1
160
              ? syncCollector(mapper)
161
              : batchingCollector(mapper, executor, parallelism);
162
        }
163
164
        static <T, R> Collector<T, ?, Stream<R>> streamingOrdered(Function<T, R> mapper, Executor executor, int parallelism) {
165
            requireNonNull(executor, "executor can't be null");
166
            requireNonNull(mapper, "mapper can't be null");
167 1 1. streamingOrdered : removed call to com/pivovarit/collectors/Preconditions::requireValidParallelism → KILLED
            requireValidParallelism(parallelism);
168 1 1. streamingOrdered : removed call to com/pivovarit/collectors/Preconditions::requireValidExecutor → KILLED
            requireValidExecutor(executor);
169
170 2 1. streamingOrdered : replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector$BatchingCollectors::streamingOrdered → KILLED
2. streamingOrdered : negated conditional → KILLED
            return parallelism == 1
171
              ? syncCollector(mapper)
172
              : batchingCollector(mapper, executor, parallelism);
173
        }
174
175
        private static <T, R> Collector<T, ?, Stream<R>> batchingCollector(Function<T, R> mapper, Executor executor, int parallelism) {
176 1 1. batchingCollector : replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector$BatchingCollectors::batchingCollector → KILLED
            return collectingAndThen(
177
              toList(),
178
              list -> {
179
                  // no sense to repack into batches of size 1
180 1 1. lambda$batchingCollector$1 : negated conditional → KILLED
                  if (list.size() == parallelism) {
181 1 1. lambda$batchingCollector$1 : replaced return value with Stream.empty for com/pivovarit/collectors/ParallelStreamCollector$BatchingCollectors::lambda$batchingCollector$1 → KILLED
                      return list.stream()
182
                        .collect(new ParallelStreamCollector<>(
183
                          mapper,
184
                          ordered(),
185
                          emptySet(),
186
                          Dispatcher.from(executor, parallelism)));
187
                  } else {
188 1 1. lambda$batchingCollector$1 : replaced return value with Stream.empty for com/pivovarit/collectors/ParallelStreamCollector$BatchingCollectors::lambda$batchingCollector$1 → KILLED
                      return partitioned(list, parallelism)
189
                        .collect(collectingAndThen(new ParallelStreamCollector<>(
190
                            batching(mapper),
191
                            ordered(),
192
                            emptySet(),
193
                            Dispatcher.from(executor, parallelism)),
194 1 1. lambda$batchingCollector$0 : replaced return value with Stream.empty for com/pivovarit/collectors/ParallelStreamCollector$BatchingCollectors::lambda$batchingCollector$0 → KILLED
                          s -> s.flatMap(Collection::stream)));
195
                  }
196
              });
197
        }
198
199
        private static <T, R> Collector<T, Stream.Builder<R>, Stream<R>> syncCollector(Function<T, R> mapper) {
200 1 1. syncCollector : replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector$BatchingCollectors::syncCollector → KILLED
            return Collector.of(Stream::builder, (rs, t) -> rs.add(mapper.apply(t)), (rs, rs2) -> {
201
                throw new UnsupportedOperationException("Using parallel stream with parallel collectors is a bad idea");
202
            }, Stream.Builder::build);
203
        }
204
    }
205
}

Mutations

56

1.1
Location : supplier
Killed by : com.pivovarit.collectors.test.BasicProcessingTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.test.BasicProcessingTest]/[test-factory:shouldProcessEmpty()]/[dynamic-test:#15]
replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector::supplier → KILLED

61

1.1
Location : accumulator
Killed by : com.pivovarit.collectors.test.BasicProcessingTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.test.BasicProcessingTest]/[test-factory:shouldProcessAllElementsInOrder()]/[dynamic-test:#10]
replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector::accumulator → KILLED

62

1.1
Location : lambda$accumulator$1
Killed by : none
removed call to com/pivovarit/collectors/Dispatcher::start → TIMED_OUT

63

1.1
Location : lambda$accumulator$0
Killed by : com.pivovarit.collectors.test.BasicProcessingTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.test.BasicProcessingTest]/[test-factory:shouldProcessAllElementsInOrder()]/[dynamic-test:#10]
replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector::lambda$accumulator$0 → KILLED

69

1.1
Location : combiner
Killed by : none
replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector::combiner → SURVIVED
Covering tests

77

1.1
Location : finisher
Killed by : com.pivovarit.collectors.test.BasicProcessingTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.test.BasicProcessingTest]/[test-factory:shouldProcessEmpty()]/[dynamic-test:#15]
replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector::finisher → KILLED

78

1.1
Location : lambda$finisher$3
Killed by : none
removed call to com/pivovarit/collectors/Dispatcher::stop → SURVIVED
Covering tests

79

1.1
Location : lambda$finisher$3
Killed by : com.pivovarit.collectors.test.BasicProcessingTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.test.BasicProcessingTest]/[test-factory:shouldProcessAllElementsInOrder()]/[dynamic-test:#10]
replaced return value with Stream.empty for com/pivovarit/collectors/ParallelStreamCollector::lambda$finisher$3 → KILLED

85

1.1
Location : characteristics
Killed by : none
replaced return value with Collections.emptySet for com/pivovarit/collectors/ParallelStreamCollector::characteristics → SURVIVED
Covering tests

91

1.1
Location : streaming
Killed by : com.pivovarit.collectors.test.BasicProcessingTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.test.BasicProcessingTest]/[test-factory:shouldProcessEmpty()]/[dynamic-test:#10]
replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector::streaming → KILLED

96

1.1
Location : streaming
Killed by : none
removed call to com/pivovarit/collectors/Preconditions::requireValidParallelism → TIMED_OUT

98

1.1
Location : streaming
Killed by : com.pivovarit.collectors.test.BasicParallelismTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.test.BasicParallelismTest]/[test-factory:shouldProcessEmptyWithMaxParallelism()]/[dynamic-test:#17]
replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector::streaming → KILLED

104

1.1
Location : streaming
Killed by : none
removed call to com/pivovarit/collectors/Preconditions::requireValidExecutor → SURVIVED
Covering tests

106

1.1
Location : streaming
Killed by : com.pivovarit.collectors.test.BasicProcessingTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.test.BasicProcessingTest]/[test-factory:shouldProcessEmpty()]/[dynamic-test:#12]
replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector::streaming → KILLED

112

1.1
Location : streaming
Killed by : none
removed call to com/pivovarit/collectors/Preconditions::requireValidParallelism → TIMED_OUT

113

1.1
Location : streaming
Killed by : none
removed call to com/pivovarit/collectors/Preconditions::requireValidExecutor → SURVIVED
Covering tests

115

1.1
Location : streaming
Killed by : com.pivovarit.collectors.test.BasicParallelismTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.test.BasicParallelismTest]/[test-factory:shouldProcessEmptyWithMaxParallelism()]/[dynamic-test:#29]
replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector::streaming → KILLED

121

1.1
Location : streamingOrdered
Killed by : com.pivovarit.collectors.test.BasicProcessingTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.test.BasicProcessingTest]/[test-factory:shouldProcessEmpty()]/[dynamic-test:#15]
replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector::streamingOrdered → KILLED

126

1.1
Location : streamingOrdered
Killed by : none
removed call to com/pivovarit/collectors/Preconditions::requireValidParallelism → TIMED_OUT

128

1.1
Location : streamingOrdered
Killed by : com.pivovarit.collectors.test.BasicParallelismTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.test.BasicParallelismTest]/[test-factory:shouldProcessEmptyWithMaxParallelism()]/[dynamic-test:#42]
replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector::streamingOrdered → KILLED

134

1.1
Location : streamingOrdered
Killed by : none
removed call to com/pivovarit/collectors/Preconditions::requireValidExecutor → SURVIVED
Covering tests

136

1.1
Location : streamingOrdered
Killed by : com.pivovarit.collectors.test.BasicProcessingTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.test.BasicProcessingTest]/[test-factory:shouldProcessEmpty()]/[dynamic-test:#17]
replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector::streamingOrdered → KILLED

142

1.1
Location : streamingOrdered
Killed by : com.pivovarit.collectors.test.ParallelismValidationTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.test.ParallelismValidationTest]/[test-factory:shouldRejectInvalidRejectedExecutionHandlerFactory()]/[dynamic-test:#10]
removed call to com/pivovarit/collectors/Preconditions::requireValidParallelism → KILLED

143

1.1
Location : streamingOrdered
Killed by : none
removed call to com/pivovarit/collectors/Preconditions::requireValidExecutor → SURVIVED
Covering tests

145

1.1
Location : streamingOrdered
Killed by : com.pivovarit.collectors.test.BasicParallelismTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.test.BasicParallelismTest]/[test-factory:shouldProcessEmptyWithMaxParallelism()]/[dynamic-test:#32]
replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector::streamingOrdered → KILLED

156

1.1
Location : streaming
Killed by : com.pivovarit.collectors.test.ParallelismValidationTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.test.ParallelismValidationTest]/[test-factory:shouldRejectInvalidRejectedExecutionHandlerFactory()]/[dynamic-test:#8]
removed call to com/pivovarit/collectors/Preconditions::requireValidParallelism → KILLED

157

1.1
Location : streaming
Killed by : com.pivovarit.collectors.test.ExecutorValidationTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.test.ExecutorValidationTest]/[test-factory:shouldRejectInvalidRejectedExecutionHandlerFactory()]/[dynamic-test:#28]
removed call to com/pivovarit/collectors/Preconditions::requireValidExecutor → KILLED

159

1.1
Location : streaming
Killed by : com.pivovarit.collectors.test.RejectedExecutionHandlingTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.test.RejectedExecutionHandlingTest]/[test-factory:shouldRejectInvalidRejectedExecutionHandlerFactory()]/[dynamic-test:#6]
negated conditional → KILLED

2.2
Location : streaming
Killed by : com.pivovarit.collectors.test.BasicParallelismTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.test.BasicParallelismTest]/[test-factory:shouldProcessEmptyWithMaxParallelism()]/[dynamic-test:#8]
replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector$BatchingCollectors::streaming → KILLED

167

1.1
Location : streamingOrdered
Killed by : com.pivovarit.collectors.test.ParallelismValidationTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.test.ParallelismValidationTest]/[test-factory:shouldRejectInvalidRejectedExecutionHandlerFactory()]/[dynamic-test:#11]
removed call to com/pivovarit/collectors/Preconditions::requireValidParallelism → KILLED

168

1.1
Location : streamingOrdered
Killed by : com.pivovarit.collectors.test.ExecutorValidationTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.test.ExecutorValidationTest]/[test-factory:shouldRejectInvalidRejectedExecutionHandlerFactory()]/[dynamic-test:#36]
removed call to com/pivovarit/collectors/Preconditions::requireValidExecutor → KILLED

170

1.1
Location : streamingOrdered
Killed by : com.pivovarit.collectors.test.BasicParallelismTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.test.BasicParallelismTest]/[test-factory:shouldProcessEmptyWithMaxParallelism()]/[dynamic-test:#11]
replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector$BatchingCollectors::streamingOrdered → KILLED

2.2
Location : streamingOrdered
Killed by : com.pivovarit.collectors.test.RejectedExecutionHandlingTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.test.RejectedExecutionHandlingTest]/[test-factory:shouldRejectInvalidRejectedExecutionHandlerFactory()]/[dynamic-test:#8]
negated conditional → KILLED

176

1.1
Location : batchingCollector
Killed by : com.pivovarit.collectors.test.BasicParallelismTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.test.BasicParallelismTest]/[test-factory:shouldProcessEmptyWithMaxParallelism()]/[dynamic-test:#55]
replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector$BatchingCollectors::batchingCollector → KILLED

180

1.1
Location : lambda$batchingCollector$1
Killed by : com.pivovarit.collectors.test.BatchingTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.test.BatchingTest]/[test-factory:shouldProcessOnExactlyNThreads()]/[dynamic-test:#3]
negated conditional → KILLED

181

1.1
Location : lambda$batchingCollector$1
Killed by : com.pivovarit.collectors.test.BasicParallelismTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.test.BasicParallelismTest]/[test-factory:shouldProcessAllElementsWithMaxParallelism()]/[dynamic-test:#88]
replaced return value with Stream.empty for com/pivovarit/collectors/ParallelStreamCollector$BatchingCollectors::lambda$batchingCollector$1 → KILLED

188

1.1
Location : lambda$batchingCollector$1
Killed by : com.pivovarit.collectors.test.BasicProcessingTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.test.BasicProcessingTest]/[test-factory:shouldProcessAllElements()]/[dynamic-test:#14]
replaced return value with Stream.empty for com/pivovarit/collectors/ParallelStreamCollector$BatchingCollectors::lambda$batchingCollector$1 → KILLED

194

1.1
Location : lambda$batchingCollector$0
Killed by : com.pivovarit.collectors.test.BasicProcessingTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.test.BasicProcessingTest]/[test-factory:shouldProcessAllElements()]/[dynamic-test:#14]
replaced return value with Stream.empty for com/pivovarit/collectors/ParallelStreamCollector$BatchingCollectors::lambda$batchingCollector$0 → KILLED

200

1.1
Location : syncCollector
Killed by : com.pivovarit.collectors.test.BasicParallelismTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.test.BasicParallelismTest]/[test-factory:shouldProcessEmptyWithMaxParallelism()]/[dynamic-test:#11]
replaced return value with null for com/pivovarit/collectors/ParallelStreamCollector$BatchingCollectors::syncCollector → KILLED

Active mutators

Tests examined


Report generated by PIT 1.17.3