Skip to content
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

add test case for StreamIdentifier serialization #1200

Merged

Conversation

vincentvilo-aws
Copy link
Contributor

Issue #, if available:
N/A

Description of changes:
Add a test case to make sure the pattern "::" is recognized as an invalid StreamIdentifier

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@@ -44,7 +44,8 @@ public void testMultiStreamDeserializationFail() {
"123456789012:stream-name:", // missing creation epoch
"123456789012:stream-name:-123", // negative creation epoch
"123456789012:stream-name:abc", // non-numeric creation epoch
""
"",
"::" // missing account id, stream name, and epoch
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: you could have inserted this after line ~38 to avoid the unnecessary s/""/"",/ edit. Always appending to the tail:

  1. may unnecessarily increase the blast radius of the edit (unless there's a pragmatic reason like ordering)
  2. increases the chance of merge conflicts (e.g., two+ contributors append to tail; likely everyone but the first-to-merge suffers a conflict)

@stair-aws stair-aws added the v2.x Issues related to the 2.x version label Aug 22, 2023
@vincentvilo-aws vincentvilo-aws merged commit 78b565f into awslabs:master Aug 22, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2.x Issues related to the 2.x version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants