Skip to content

Commit

Permalink
ci: Make sure release builds also use Jenkins and CI profile
Browse files Browse the repository at this point in the history
  • Loading branch information
astubbs committed Sep 9, 2021
1 parent 07cccca commit 3ad49c2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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<TopicPartition, OffsetAndMetadata> committed = newConsumer.committed(newConsumer.assignment());
Set<TopicPartition> assignment = newConsumer.assignment();
Truth.assertWithMessage("Should be assigned some partitions").that(assignment).isNotEmpty();

//
Map<TopicPartition, OffsetAndMetadata> 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();
Expand Down

0 comments on commit 3ad49c2

Please sign in to comment.