Skip to content

[KIP-951] Review comments for the tests#4767

Merged
Emanuele Sabellico (emasab) merged 5 commits intomasterfrom
dev_kip_951_tests_esabellico_review
Jun 21, 2024
Merged

[KIP-951] Review comments for the tests#4767
Emanuele Sabellico (emasab) merged 5 commits intomasterfrom
dev_kip_951_tests_esabellico_review

Conversation

@emasab
Copy link
Copy Markdown
Contributor

Mainly in the mock handlers there's need to use the generic rd_kafka_buf_write_tags to support more tags later without duplicating the code and the leader changes can be more than one so that's reflected in the new code.

I don't see necessary to have a separate file for
the metadata update mock so kept it in the same metadata mock test file. Have changed a bit the test to be parametric for producer, consumer a single partition migration or two.

Given there's a fast metadata refresh that is still called, we shouldn't just verify that messages are Fetched or Produced to the new leader but that it's done before the metadata refresh.

One way it to slow down the metadata refresh but the mock rtts rd_kafka_mock_broker_push_request_error_rtts isn't used in the metadata mock handler. Tried to use it but there were issues because the metadata request is also used by the producer for the test.

Tried the interceptors too but the rd_kafka_interceptor_f_on_request_sent_t is called after sending the request. If it was before we could set a sleep there.

I think at the moment we cannot test more than that, automatically and in a predictable way.

Anchit Jain (anchitj) and others added 3 commits June 18, 2024 13:15
mainly in the mock handlers there's need to use the generic
rd_kafka_buf_write_tags to support more tags later without
duplicating the code and the leader changes can be more than one so
that's reflected in the new code.

I don't see necessary to have a separate file for
the metadata update mock so kept it in the same metadata mock test file.
Have changed a bit the test to be parametric for producer, consumer
a single partition migration or two.

Given there's a fast metadata refresh that is still called, we
shouldn't just verify that messages are Fetched or Produced to the
new leader but that it's done before the metadata refresh.

One way it to slow down the metadata refresh but the mock handler
rd_kafka_mock_broker_push_request_error_rtts isn't used in the metadata
mock handler. Tried that but the were issues because the metadata
request is also used by the producer for the test.

Tried the interceptors too but the `rd_kafka_interceptor_f_on_request_sent_t`
is called after sending the request. If it was before we could set a sleep there.

I think at the moment we cannot test more than that automatically
and in a predictable way
@emasab Emanuele Sabellico (emasab) requested a review from a team as a code owner June 20, 2024 12:28
@emasab Emanuele Sabellico (emasab) changed the title Review comments: [KIP-951] Review comments for the tests Jun 20, 2024
Copy link
Copy Markdown
Contributor

@anchitj Anchit Jain (anchitj) left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@emasab Emanuele Sabellico (emasab) changed the base branch from dev_kip_951_tests to master June 21, 2024 13:15
@emasab Emanuele Sabellico (emasab) deleted the dev_kip_951_tests_esabellico_review branch June 21, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants