[ 
https://issues.apache.org/jira/browse/KAFKA-16389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17828538#comment-17828538
 ] 

Kirk True edited comment on KAFKA-16389 at 3/19/24 11:21 PM:
-------------------------------------------------------------

I've attached [^KAFKA-16389.patch] which _appears_ to address the issue in the 
system test so that it passes.

The patch includes two changes:

1. {{verifiable_consumer.py}} now updates the test’s list of assignments 
instead of overwriting them
2. {{consumer_test.py}} now waits for the assignments to be made instead of 
expecting them to be immediately correct

I am _not_ necessarily suggesting that we change the test to make the new 
consumer work. This is patch is provided to show how the new consumer behaves 
differently than the old.


was (Author: kirktrue):
I've attached a patch which _appears_ to address the issue in the system test 
so that it passes.

The patch includes two changes:

1. {{verifiable_consumer.py}} now updates the test’s list of assignments 
instead of overwriting them
2. {{consumer_test.py}} now waits for the assignments to be made instead of 
expecting them to be immediately correct

I am _not_ necessarily suggesting that we change the test to make the new 
consumer work. This is patch is provided to show how the new consumer behaves 
differently than the old.

> consumer_test.py’s test_valid_assignment fails with new consumer
> ----------------------------------------------------------------
>
>                 Key: KAFKA-16389
>                 URL: https://issues.apache.org/jira/browse/KAFKA-16389
>             Project: Kafka
>          Issue Type: Bug
>          Components: clients, consumer, system tests
>    Affects Versions: 3.7.0
>            Reporter: Kirk True
>            Priority: Blocker
>              Labels: kip-848-client-support, system-tests
>             Fix For: 3.8.0
>
>         Attachments: KAFKA-16389.patch
>
>
> The following error is reported when running the {{test_valid_assignment}} 
> test from {{consumer_test.py}}:
>  {code}
> Traceback (most recent call last):
>   File 
> "/usr/local/lib/python3.9/dist-packages/ducktape/tests/runner_client.py", 
> line 186, in _do_run
>     data = self.run_test()
>   File 
> "/usr/local/lib/python3.9/dist-packages/ducktape/tests/runner_client.py", 
> line 246, in run_test
>     return self.test_context.function(self.test)
>   File "/usr/local/lib/python3.9/dist-packages/ducktape/mark/_mark.py", line 
> 433, in wrapper
>     return functools.partial(f, *args, **kwargs)(*w_args, **w_kwargs)
>   File "/opt/kafka-dev/tests/kafkatest/tests/client/consumer_test.py", line 
> 584, in test_valid_assignment
>     wait_until(lambda: self.valid_assignment(self.TOPIC, self.NUM_PARTITIONS, 
> consumer.current_assignment()),
>   File "/usr/local/lib/python3.9/dist-packages/ducktape/utils/util.py", line 
> 58, in wait_until
>     raise TimeoutError(err_msg() if callable(err_msg) else err_msg) from 
> last_exception
> ducktape.errors.TimeoutError: expected valid assignments of 6 partitions when 
> num_started 2: [('ducker@ducker05', []), ('ducker@ducker06', [])]
> {code}
> To reproduce, create a system test suite file named 
> {{test_valid_assignment.yml}} with these contents:
> {code:yaml}
> failures:
>   - 
> 'kafkatest/tests/client/consumer_test.py::AssignmentValidationTest.test_valid_assignment@{"metadata_quorum":"ISOLATED_KRAFT","use_new_coordinator":true,"group_protocol":"consumer","group_remote_assignor":"range"}'
> {code}
> Then set the the {{TC_PATHS}} environment variable to include that test suite 
> file.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to