-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating tests with distributed mode #338
Conversation
...ce-connector/src/integration-test/java/io/aiven/kafka/connect/s3/source/IntegrationTest.java
Outdated
Show resolved
Hide resolved
...ce-connector/src/integration-test/java/io/aiven/kafka/connect/s3/source/IntegrationTest.java
Outdated
Show resolved
Hide resolved
...ce-connector/src/integration-test/java/io/aiven/kafka/connect/s3/source/IntegrationBase.java
Show resolved
Hide resolved
props.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest"); | ||
|
||
final Map<String, Object> messages = new HashMap<>(); | ||
Map<String, Object> offsetRec; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable declaration is redundant here and unnecessary widening the variable scope. It can be declared together with the assignment
while (messages.size() < expectedMessageCount) { | ||
final ConsumerRecords<byte[], byte[]> records = consumer.poll(5L); | ||
for (final ConsumerRecord<byte[], byte[]> record : records) { | ||
offsetRec = OBJECT_MAPPER.readValue(new String(record.value(), StandardCharsets.UTF_8), // NOPMD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conversion to String seems to be redundant, objectMapper is able to parse byte arrays.
...ce-connector/src/integration-test/java/io/aiven/kafka/connect/s3/source/IntegrationTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
integration tests now run in connect distributed mode
verify offset storage keys