-
Notifications
You must be signed in to change notification settings - Fork 930
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
base: async
Are you sure you want to change the base?
Conversation
🎉 All Contributor License Agreements have been signed. Ready to merge. |
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
@@ -34,7 +38,7 @@ def get_test_info(test_type): | |||
def main(): | |||
"""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
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