Skip to content
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

fix(server): Fix lua reply builder #871

Merged
merged 1 commit into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/server/main_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,6 @@ void InterpreterReplier::SendSimpleStrArr(const string_view* arr, uint32_t count
explr_->OnString(arr[i]);
}
explr_->OnArrayEnd();
PostItem();
}

void InterpreterReplier::SendNullArray() {
Expand Down
7 changes: 7 additions & 0 deletions src/server/multi_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down