-
Notifications
You must be signed in to change notification settings - Fork 169
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
fix bug: adding back prefix in service group creation #1339
fix bug: adding back prefix in service group creation #1339
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.
Great catch!
Thanks!
Could you add a test for this case?
async-nats/src/service/mod.rs
Outdated
@@ -639,7 +639,7 @@ impl Group { | |||
queue_group: Z, | |||
) -> Group { | |||
Group { | |||
prefix: prefix.to_string(), | |||
prefix: format!("{}.{}", self.prefix.to_string(), prefix.to_string()), |
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.
This does not need to_string()
call.
prefix: format!("{}.{}", self.prefix.to_string(), prefix.to_string()), | |
prefix: format!("{}.{}", self.prefix, prefix.to_string()), |
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.
updated
test case added. |
Hm, I' not a fan of adding a test that starts a server in a unit test and we do not use this pattern across the client, but I can refactor it later myself based on your test, as you already did a lot. Please fix fmt and it's good to merge. |
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.
Please fix fmt.
Thansk Jarema, cargo fmt applied. |
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.
LGTM!
Thanks for your contribution!
fix bug: adding back prefix in service group creation
Currently, the prefix will be missing if we are creating group from group.
e.g.
this patch is to fix and apply the prefix for the g2 endpoint such that the topic will become
level1.level2.endpoint2