-
Notifications
You must be signed in to change notification settings - Fork 14.8k
MINOR: Use explicit AcknowledgeType enums in SharePartitionTest #20802
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
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.
Thanks for the PR. Just a couple of minor comments.
| ackResult = sharePartition.acknowledge( | ||
| MEMBER_ID, | ||
| List.of(new ShareAcknowledgementBatch(20, 25, List.of((byte) 3)))); | ||
| List.of(new ShareAcknowledgementBatch(20, 25, List.of(AcknowledgeType.RELEASE.id)))); |
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.
3 is REJECT :)
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 catch! Done.
| new ShareAcknowledgementBatch(5, 6, List.of(AcknowledgeType.RELEASE.id)), | ||
| new ShareAcknowledgementBatch(10, 18, List.of( | ||
| (byte) 2, (byte) 2, (byte) 2, (byte) 2, (byte) 2, (byte) 0, (byte) 0, (byte) 0, (byte) 2 | ||
| AcknowledgeType.RELEASE.id, AcknowledgeType.RELEASE.id, AcknowledgeType.RELEASE.id, AcknowledgeType.RELEASE.id, AcknowledgeType.RELEASE.id, ACKNOWLEDGE_TYPE_GAP_ID, ACKNOWLEDGE_TYPE_GAP_ID, ACKNOWLEDGE_TYPE_GAP_ID, AcknowledgeType.RELEASE.id |
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.
Break the line now it's so long?
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.
Thanks for comment, done.
This PR updates the
SharePartitionTest.javaunit tests to useAcknowledgeTypeenums instead of hardcoded byte values. This makes thetests more readable and maintainable, and ensures that acknowledgement
types are referenced consistently throughout the codebase.