Skip to content

Commit

Permalink
deps(master): bump kafka-clients from 2.6.0 to 2.7.0 (#93)
Browse files Browse the repository at this point in the history
* deps(master): bump kafka-clients from 2.6.0 to 2.7.0

Bumps kafka-clients from 2.6.0 to 2.7.0.

Signed-off-by: dependabot[bot] <support@github.com>

* chore(exporter): fix usage of MockProducer

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nicolas Pépin-Perreault <nicolas.pepin-perreault@camunda.com>
  • Loading branch information
dependabot[bot] and npepinpe authored Jan 9, 2021
1 parent 5aee347 commit 9593323
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ public void shouldUpdatePositionBasedOnCompletedRequests() throws Exception {
final int recordsCount = 4;

// control how many are completed
mockProducerFactory.mockProducer = new MockProducer<>(false, null, null);
mockProducerFactory.mockProducer =
new MockProducer<>(false, new RecordIdSerializer(), new RecordSerializer());
rawConfig.maxInFlightRecords = recordsCount; // prevent blocking awaiting completion
mockConfigParser.forceParse(rawConfig);

Expand All @@ -104,7 +105,8 @@ public void shouldUpdatePositionBasedOnCompletedRequests() throws Exception {
@Test
public void shouldBlockIfRequestQueueFull() throws Exception {
// given
mockProducerFactory.mockProducer = new MockProducer<>(false, null, null);
mockProducerFactory.mockProducer =
new MockProducer<>(false, new RecordIdSerializer(), new RecordSerializer());
final int recordsCount = 2;

// since maxInFlightRecords is less than recordsCount, it will force awaiting
Expand Down Expand Up @@ -167,7 +169,8 @@ public void shouldDoNothingIfAlreadyClosed() throws Exception {
@Test
public void shouldUpdatePositionToLatestCompletedEventEvenIfOneRecordFails() throws Exception {
// given
mockProducerFactory.mockProducer = new MockProducer<>(false, null, null);
mockProducerFactory.mockProducer =
new MockProducer<>(false, new RecordIdSerializer(), new RecordSerializer());
rawConfig.maxInFlightRecords = 2;
mockConfigParser.forceParse(rawConfig);

Expand All @@ -191,7 +194,8 @@ public void shouldUpdatePositionToLatestCompletedEventEvenIfOneRecordFails() thr
@Test
public void shouldCloseExporterIfRecordFails() throws Exception {
// given
mockProducerFactory.mockProducer = new MockProducer<>(false, null, null);
mockProducerFactory.mockProducer =
new MockProducer<>(false, new RecordIdSerializer(), new RecordSerializer());
testHarness.configure(EXPORTER_ID, rawConfig);
testHarness.open();

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<version.jackson>2.12.0</version.jackson>
<version.junit>4.13.1</version.junit>
<version.junit-jupiter>5.7.0</version.junit-jupiter>
<version.kafka>2.6.0</version.kafka>
<version.kafka>2.7.0</version.kafka>
<version.mockito>3.7.0</version.mockito>
<version.slf4j>1.7.30</version.slf4j>
<version.spotbugs>4.2.0</version.spotbugs>
Expand Down

0 comments on commit 9593323

Please sign in to comment.