-
Notifications
You must be signed in to change notification settings - Fork 14.8k
MINOR: Migrate verificationAllTransactionComplete from EOS system test to smoke test
#20718
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: trunk
Are you sure you want to change the base?
Conversation
|
A label of 'needs-attention' was automatically added to this PR in order to raise the |
mjsax
left a comment
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.
Overall LGTM. A few minor comments to simplify further: think we can just use a single consumer instead of creating two.
| consumer.seekToBeginning(partitions); | ||
| // Verify all transactions are finished before proceeding with data verification | ||
| if (eosEnabled) { | ||
| final Properties txnProps = new Properties(); |
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.
Seems this are the same config we setup above for props. Seems we could just reuse the ones from above?
| txnProps.put(ConsumerConfig.ISOLATION_LEVEL_CONFIG, IsolationLevel.READ_COMMITTED.toString()); | ||
|
|
||
| final VerificationResult txnResult; | ||
| try (final KafkaConsumer<byte[], byte[]> consumer = new KafkaConsumer<>(txnProps)) { |
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.
Seem we are creating a consumer here, and also below. Could we re-use the same consumer? Ie use a top level try (final KafkaConsumer<byte[], byte[]> consumer = new KafkaConsumer<>(...)) and nest if (eosEnabled) block inside this try-catch, as well as the other verification we do later?
Migrate
verificationAllTransactionCompleteand addVerificationResultto smoke test utils and makeverificationAllTransactionCompletereturnVerificationResulttoavoid extra exception handling
Reviewers: Matthias J. Sax matthias@confluent.io