Skip to content

Commit 691eb19

Browse files
committed
rebase compile update
1 parent 01121f2 commit 691eb19

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/AbstractParallelEoSStreamProcessorTestBase.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import java.util.concurrent.TimeoutException;
3434
import java.util.concurrent.atomic.AtomicReference;
3535
import java.util.stream.Collectors;
36-
import java.util.stream.Stream;
3736

3837
import static io.confluent.csid.utils.LatchTestUtils.awaitLatch;
3938
import static io.confluent.csid.utils.StringUtils.msg;
@@ -345,7 +344,7 @@ public List<Integer> getCommitHistoryFlattened() {
345344
public List<OffsetAndMetadata> getCommitHistoryFlattenedMeta() {
346345
return (isUsingTransactionalProducer())
347346
? ktu.getProducerCommitsMeta(producerSpy)
348-
: extractAllPartitionsOffsetsSequentiallyMeta();
347+
: extractAllPartitionsOffsetsSequentiallyMeta(true);
349348
}
350349

351350
public void assertCommits(List<Integer> offsets, String description) {
@@ -381,26 +380,26 @@ public void assertCommits(List<Integer> offsets, Optional<String> description) {
381380
* Flattens the offsets of all partitions into a single sequential list
382381
*/
383382
protected List<Integer> extractAllPartitionsOffsetsSequentially(boolean trimGenesis) {
384-
return extractAllPartitionsOffsetsSequentiallyMeta().stream().
383+
return extractAllPartitionsOffsetsSequentiallyMeta(trimGenesis).stream().
385384
map(x -> (int) x.offset()) // int cast a luxury in test context - no big offsets
386385
.collect(Collectors.toList());
387386
}
388387

389388
/**
390389
* Flattens the offsets of all partitions into a single sequential list
391390
*/
392-
protected List<OffsetAndMetadata> extractAllPartitionsOffsetsSequentiallyMeta() {
391+
protected List<OffsetAndMetadata> extractAllPartitionsOffsetsSequentiallyMeta(boolean trimGenesis) {
393392
// copy the list for safe concurrent access
394393
List<Map<TopicPartition, OffsetAndMetadata>> history = new ArrayList<>(consumerSpy.getCommitHistoryInt());
395394
return history.stream()
396395
.flatMap(commits ->
397396
{
398-
Collection<OffsetAndMetadata> values = new ArrayList<>(commits.values()); // 4 debugging
399-
Stream<Integer> rawOffsets = values.stream().map(meta -> (int) meta.offset());
397+
var rawValues = new ArrayList<>(commits.values()).stream(); // 4 debugging
398+
// Stream<Integer> rawOffsets = values.stream().map(meta -> (int) meta.offset());
400399
if (trimGenesis)
401-
return rawOffsets.filter(x -> x != 0);
400+
return rawValues.filter(x -> x.offset() != 0);
402401
else
403-
return rawOffsets; // int cast a luxury in test context - no big offsets
402+
return rawValues; // int cast a luxury in test context - no big offsets
404403
}
405404
).collect(Collectors.toList());
406405
}

parallel-consumer-core/src/test/resources/logback-test.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
<!-- primary -->
3030
<logger name="io.confluent.parallelconsumer" level="info"/>
31-
<logger name="io.confluent.parallelconsumer" level="debug"/>
31+
<!-- <logger name="io.confluent.parallelconsumer" level="debug"/>-->
3232

3333
<!-- <logger name="io.confluent.csid" level="debug"/>-->
3434

0 commit comments

Comments
 (0)