1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-15 17:51:06 +00:00

fix(server): Fix lua reply builder (#871)

Fix bug in lua reply builder
This commit is contained in:
Vladislav 2023-02-23 10:56:19 +03:00 committed by GitHub
parent b5a8eef3e5
commit 9ee2834725
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -338,7 +338,6 @@ void InterpreterReplier::SendSimpleStrArr(const string_view* arr, uint32_t count
explr_->OnString(arr[i]);
}
explr_->OnArrayEnd();
PostItem();
}
void InterpreterReplier::SendNullArray() {

View file

@ -373,6 +373,13 @@ TEST_F(MultiTest, Eval) {
resp = Run({"hvals", "hmap"});
EXPECT_EQ(resp, "2222");
Run({"sadd", "s1", "a", "b"});
Run({"sadd", "s2", "a", "c"});
resp = Run({"eval", "return redis.call('SUNION', KEYS[1], KEYS[2])", "2", "s1", "s2"});
ASSERT_THAT(resp, ArrLen(3));
const auto& arr = resp.GetVec();
EXPECT_THAT(arr, ElementsAre("a", "b", "c"));
absl::SetFlag(&FLAGS_multi_eval_mode, multi_mode);
}