mapleFU commented on code in PR #1856:
URL: https://github.com/apache/kvrocks/pull/1856#discussion_r1372618777
##########
tests/cppunit/types/json_test.cc:
##########
@@ -262,7 +262,9 @@ TEST_F(RedisJsonTest, ArrLen) {
ASSERT_EQ(res.size(), 1);
ASSERT_EQ(res[0], 3);
res.clear();
- // 5. path is not found
+ // 5. key/path is not found
+ ASSERT_FALSE(json_->ArrLen("not_exists", "$.*", res).ok());
+ ASSERT_TRUE(res.empty());
Review Comment:
> call `arr_lens->clear()`
I'm +1 for this.
Also I think generally, if status is not ok, the `res` wouldn't expect
anything
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]