diff --git a/Jenkinsfile b/Jenkinsfile index 6ddee7e51..fabef949a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -51,7 +51,7 @@ def job = { sh ''' set +x gpg --import < $GPG_PRIVATE_KEY; - mvn --batch-mode clean deploy -P maven-central -Dgpg.passphrase=$GPG_PASSPHRASE + mvn --batch-mode clean deploy -P maven-central -Pjenkins -Pci -Dgpg.passphrase=$GPG_PASSPHRASE ''' } currentBuild.result = 'Success' diff --git a/parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/OffsetCommittingSanityTest.java b/parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/OffsetCommittingSanityTest.java index 36c5f3a28..e75552b35 100644 --- a/parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/OffsetCommittingSanityTest.java +++ b/parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/OffsetCommittingSanityTest.java @@ -4,6 +4,7 @@ * Copyright (C) 2020-2021 Confluent, Inc. */ +import com.google.common.truth.Truth; import io.confluent.parallelconsumer.ParallelConsumerOptions; import io.confluent.parallelconsumer.ParallelEoSStreamProcessor; import lombok.extern.slf4j.Slf4j; @@ -20,6 +21,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.concurrent.Future; import static io.confluent.parallelconsumer.ParallelEoSStreamProcessorTestBase.defaultTimeoutSeconds; @@ -111,7 +113,14 @@ private void assertCommittedOffset(String topicNameForTest, long expectedOffset) var newConsumer = kcu.createNewConsumer(false); newConsumer.subscribe(UniSets.of(topicNameForTest)); newConsumer.poll(ofSeconds(1)); - Map committed = newConsumer.committed(newConsumer.assignment()); + Set assignment = newConsumer.assignment(); + Truth.assertWithMessage("Should be assigned some partitions").that(assignment).isNotEmpty(); + + // + Map committed = newConsumer.committed(assignment); + Truth.assertThat(committed).isNotEmpty(); + + // TopicPartition tp = new TopicPartition(topicNameForTest, 0); OffsetAndMetadata offsetAndMetadata = committed.get(tp); assertThat(offsetAndMetadata).as("Should have commit history for this partition {}", tp).isNotNull();