This is an automated email from the ASF dual-hosted git repository. lianetm pushed a commit to branch lm-pick-fix-flaky-test in repository https://gitbox.apache.org/repos/asf/kafka.git
commit 0b7e5e05abd00806fdfe8d35e49edc13447b80ba Author: Lianet Magrans <[email protected]> AuthorDate: Fri Jun 20 09:59:10 2025 -0400 KAFKA-19418: Fix for flaky verifiable producer system test (#20001) Fix to avoid flakiness in verifiable producer system test. The test lists running processes and greps to find the VerifiableProducer one, but wasn't providing an specific pattern to grep (so flaky if there were more than one process containing the default grep pattern "kafka") Fix by passing a "proc_grep_string" to filter when looking for the VerifiableProducer process. All test pass successfully after the change. Reviewers: PoAn Yang <[email protected]>, Andrew Schofield <[email protected]> --- tests/kafkatest/sanity_checks/test_verifiable_producer.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/kafkatest/sanity_checks/test_verifiable_producer.py b/tests/kafkatest/sanity_checks/test_verifiable_producer.py index f05e7d6b739..d278e9c1f07 100644 --- a/tests/kafkatest/sanity_checks/test_verifiable_producer.py +++ b/tests/kafkatest/sanity_checks/test_verifiable_producer.py @@ -71,7 +71,7 @@ class TestVerifiableProducer(Test): wait_until(lambda: self.producer.num_acked > 5, timeout_sec=15, err_msg="Producer failed to start in a reasonable amount of time.") - assert is_version(node, [node.version.vstring], logger=self.logger) + assert is_version(node, [node.version.vstring], proc_grep_string=VerifiableProducer.__qualname__, logger=self.logger) self.producer.wait() num_produced = self.producer.num_acked @@ -113,8 +113,8 @@ class TestVerifiableProducer(Test): wait_until(lambda: self.producer.num_acked > 5, timeout_sec=15, err_msg="Producer failed to start in a reasonable amount of time.") - # See above comment above regarding use of version.vstring (distutils.version.LooseVersion) - assert is_version(node, [node.version.vstring], logger=self.logger) + # See comment above regarding use of version.vstring (distutils.version.LooseVersion) + assert is_version(node, [node.version.vstring], proc_grep_string=VerifiableProducer.__qualname__, logger=self.logger) self.producer.wait() num_produced = self.producer.num_acked @@ -144,8 +144,8 @@ class TestVerifiableProducer(Test): wait_until(lambda: self.producer.num_acked > 5, timeout_sec=15, err_msg="Producer failed to start in a reasonable amount of time.") - # See above comment above regarding use of version.vstring (distutils.version.LooseVersion) - assert is_version(node, [node.version.vstring], logger=self.logger) + # See comment above regarding use of version.vstring (distutils.version.LooseVersion) + assert is_version(node, [node.version.vstring], proc_grep_string=VerifiableProducer.__qualname__, logger=self.logger) self.producer.wait() num_produced = self.producer.num_acked
