mapleFU commented on code in PR #1856:
URL: https://github.com/apache/kvrocks/pull/1856#discussion_r1372843942


##########
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:
   `StatusOr<vector<>>` looks great! 🍻



##########
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:
   `StatusOr<vector<>>` looks great! 🍻



-- 
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]

Reply via email to