Skip to content
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

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

Merged
merged 5 commits into from
Jun 21, 2024

Conversation

emasab
Copy link
Contributor

@emasab emasab commented Jun 20, 2024

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.

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 emasab requested a review from a team as a code owner June 20, 2024 12:28
@emasab emasab changed the title Review comments: [KIP-951] Review comments for the tests Jun 20, 2024
@emasab emasab mentioned this pull request Jun 20, 2024
anchitj
anchitj previously approved these changes Jun 21, 2024
Copy link
Member

@anchitj 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 emasab changed the base branch from dev_kip_951_tests to master June 21, 2024 13:15
@emasab emasab dismissed anchitj’s stale review June 21, 2024 13:15

The base branch was changed.

@emasab emasab requested a review from anchitj June 21, 2024 13:16
@emasab emasab merged commit bb2843b into master Jun 21, 2024
2 checks passed
@emasab 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