-
Notifications
You must be signed in to change notification settings - Fork 932
Add integration tests for transactions #2056
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
Conversation
🎉 All Contributor License Agreements have been signed. Ready to merge. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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.
I am wondering if we should have seperate folders/test_file for performance and integration/e2e tests?
I see currently test_transaction does e2e testing, as there are no performance bounds defined
tests/ducktape/run_ducktape_test.py
Outdated
"""Run the ducktape test based on specified type""" | ||
parser = argparse.ArgumentParser(description="Confluent Kafka Python - Ducktape Test Runner") | ||
parser.add_argument('test_type', choices=['producer', 'consumer', 'producer_sr'], | ||
parser.add_argument('test_type', choices=['producer', 'consumer', 'producer_sr', 'transactions'], |
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.
Will it be possible to run specific tests if we use "producer" string parameters . Eg.
ducktape tests/ducktape/test_producer.py::SimpleProducerTest.test_basic_produce
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.
Currently I extracted the transaction tests into a standalone file as I think those involve both producer + consumer
from confluent_kafka.aio import AIOConsumer | ||
|
||
|
||
class TransactionsTest(Test): |
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.
I think we need overall design on how to perf test transaction. One of options can be : Run n number of transaction end to end for async vs sync and compare performance
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.
Good point - I was mostly doing integration tests to verify behavior, but maybe we should benchmark test transactions as well. Let me think about this
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.
Making transactions an optional configuration of the perf tests seems best as a follow-up. Make the perf tests essentially a config driven execution engine for parameters of a performance scenario we can pick and choose for a given context.
tests/ducktape/producer_strategy.py
Outdated
raise NotImplementedError() | ||
|
||
|
||
class AsyncProducerStrategy(ProducerStrategy): |
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.
Added it temporarily to unblock this PR. Will remove once the PR to add is merged and will rebase
What
Add integration tests for transactions:
test_commit_transaction
: committed messages visible toread_committed
.test_abort_transaction_then_retry_commit
: abort invisible; retry+commit visible.test_send_offsets_to_transaction
: offsets committed correctly viasend_offsets_to_transaction
.test_commit_multiple_topics_partitions
: atomic commit across topics/partitions.Checklist
References
JIRA: https://confluentinc.atlassian.net/browse/NONJAVACLI-3991
Test & Review
Open questions / Follow-ups