MCPcopy Create free account
hub / github.com/apache/kvrocks / ParseClientCommand

Function ParseClientCommand

tests/cppunit/server_client_pause_test.cc:169–178  ·  view source on GitHub ↗

Helper: look up the "client" command from the global table and invoke Parse.

Source from the content-addressed store, hash-verified

167
168// Helper: look up the "client" command from the global table and invoke Parse.
169static Status ParseClientCommand(const std::vector<std::string> &args) {
170 auto *cmd_table = redis::CommandTable::Get();
171 auto it = cmd_table->find("client");
172 if (it == cmd_table->end()) {
173 return {Status::NotOK, "client command not found in table"};
174 }
175 auto cmd = it->second->factory();
176 cmd->SetArgs(args);
177 return cmd->Parse(args);
178}
179
180TEST_F(ServerClientPauseTest, ParsePauseBasic) {
181 auto s = ParseClientCommand({"client", "pause", "1000"});

Callers 1

TEST_FFunction · 0.85

Calls 3

endMethod · 0.80
SetArgsMethod · 0.80
ParseMethod · 0.45

Tested by

no test coverage detected