未验证 提交 0da3c712 编写于 作者: G groot 提交者: GitHub

HasTable with a not exist table name, return error status (#1761)

Signed-off-by: Ngroot <yihua.mo@zilliz.com>
上级 f93b4641
......@@ -46,11 +46,7 @@ HasTableRequest::OnExecute() {
// step 2: check table existence
status = DBWrapper::DB()->HasNativeTable(table_name_, has_table_);
fiu_do_on("HasTableRequest.OnExecute.table_not_exist", status = Status(milvus::SERVER_UNEXPECTED_ERROR, ""));
fiu_do_on("HasTableRequest.OnExecute.throw_std_exception", throw std::exception());
if (!status.ok()) {
return status;
}
// only process root table, ignore partition table
if (has_table_) {
......
......@@ -206,10 +206,6 @@ TEST_F(RpcHandlerTest, HAS_TABLE_TEST) {
ASSERT_EQ(error_code, ::milvus::grpc::ErrorCode::SUCCESS);
fiu_init(0);
fiu_enable("HasTableRequest.OnExecute.table_not_exist", 1, NULL, 0);
handler->HasTable(&context, &request, &reply);
ASSERT_NE(reply.status().error_code(), ::milvus::grpc::ErrorCode::SUCCESS);
fiu_disable("HasTableRequest.OnExecute.table_not_exist");
fiu_enable("HasTableRequest.OnExecute.throw_std_exception", 1, NULL, 0);
handler->HasTable(&context, &request, &reply);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册