diff --git a/tests/cppunit/types/json_test.cc b/tests/cppunit/types/json_test.cc index d496a90b0c9..d45d1a766b7 100644 --- a/tests/cppunit/types/json_test.cc +++ b/tests/cppunit/types/json_test.cc @@ -229,13 +229,13 @@ TEST_F(RedisJsonTest, Clear) { TEST_F(RedisJsonTest, StrAppend) { ASSERT_TRUE(json_->Set(key_, "$", R"({"a":"foo", "nested": {"a": "hello"}, "nested2": {"a": 31}})").ok()); - ASSERT_TRUE(json_->StrAppend(key_, "$.a", "ba", append_cnt_).ok()); + ASSERT_TRUE(json_->StrAppend(key_, "$.a", "be", append_cnt_).ok()); ASSERT_EQ(append_cnt_.size(), 1); ASSERT_EQ(append_cnt_[0], 5); append_cnt_.clear(); ASSERT_TRUE(json_->Set(key_, "$", R"({"a":"foo", "nested": {"a": "hello"}, "nested2": {"a": 31}})").ok()); - ASSERT_TRUE(json_->StrAppend(key_, "$..a", "ba", append_cnt_).ok()); + ASSERT_TRUE(json_->StrAppend(key_, "$..a", "be", append_cnt_).ok()); ASSERT_EQ(append_cnt_.size(), 3); int64_t result1[] = {5, 7, -1}; for (int i = 0; i < 3; ++i) { diff --git a/tests/gocase/unit/type/json/json_test.go b/tests/gocase/unit/type/json/json_test.go index 4e9a4db3648..66a4e94f26e 100644 --- a/tests/gocase/unit/type/json/json_test.go +++ b/tests/gocase/unit/type/json/json_test.go @@ -135,12 +135,12 @@ func TestJson(t *testing.T) { var result1 = make([]interface{}, 0) result1 = append(result1, int64(5)) require.NoError(t, rdb.Do(ctx, "JSON.SET", "a", "$", `{"a":"foo", "nested": {"a": "hello"}, "nested2": {"a": 31}}`).Err()) - require.Equal(t, rdb.Do(ctx, "JSON.STRAPPEND", "a", "$.a", "ba").Val(), result1) + require.Equal(t, rdb.Do(ctx, "JSON.STRAPPEND", "a", "$.a", "be").Val(), result1) var result2 = make([]interface{}, 0) result2 = append(result2, int64(5), int64(7), interface {}(nil)) require.NoError(t, rdb.Do(ctx, "JSON.SET", "a", "$", `{"a":"foo", "nested": {"a": "hello"}, "nested2": {"a": 31}}`).Err()) - require.Equal(t, rdb.Do(ctx, "JSON.STRAPPEND", "a", "$..a", "ba").Val(), result2) + require.Equal(t, rdb.Do(ctx, "JSON.STRAPPEND", "a", "$..a", "be").Val(), result2) }) t.Run("JSON.STRLEN basics", func(t *testing.T) {