-
Notifications
You must be signed in to change notification settings - Fork 1.1k
chore: add tests #5128
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
chore: add tests #5128
Conversation
Signed-off-by: kostas <[email protected]>
@@ -457,8 +462,15 @@ void TDigestFamily::Quantile(CmdArgList args, const CommandContext& cmd_cntx) { | |||
}; | |||
|
|||
auto res = cmd_cntx.tx->ScheduleSingleHopT(cb); | |||
// SendError covers ok | |||
return cmd_cntx.rb->SendError(res.status()); | |||
if (!res) { |
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 will extract those in a function at some point 🤣
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.
Ah, okay. So my previous comment can be ignored.
@@ -20,7 +20,14 @@ class TDigestFamilyTest : public BaseFamilyTest { | |||
protected: | |||
}; | |||
|
|||
TEST_F(TDigestFamilyTest, TDigestBasic) { | |||
TEST_F(TDigestFamilyTest, Basic) { |
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.
We now have tests for all TDIGEST
commands :)
only serialization is left and this is feature complete. |
// SendError covers ok | ||
return cmd_cntx.rb->SendError(res.status()); | ||
if (!res) { | ||
return cmd_cntx.rb->SendError(res.status()); |
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 move it below auto* rb = static_cast<facade::RedisReplyBuilder*>(cmd_cntx.rb);
@@ -457,8 +462,15 @@ void TDigestFamily::Quantile(CmdArgList args, const CommandContext& cmd_cntx) { | |||
}; | |||
|
|||
auto res = cmd_cntx.tx->ScheduleSingleHopT(cb); | |||
// SendError covers ok | |||
return cmd_cntx.rb->SendError(res.status()); | |||
if (!res) { |
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.
Ah, okay. So my previous comment can be ignored.
Fixes a bunch of bugs around command replies for tdigest functions and adds tests.