unitest validation (#1788)

Signed-off-by: groot <yihua.mo@zilliz.com>
pull/1798/head
groot 2020-03-28 19:26:39 +08:00 committed by GitHub
parent 4cd5d8dd1b
commit a3935eed71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -514,6 +514,7 @@ TEST_F(RpcHandlerTest, COMBINE_SEARCH_TEST) {
int64_t index = 0;
for (auto& result_ptr : result_array) {
ASSERT_NE(result_ptr->ids_size(), 0);
ASSERT_NE(result_ptr->row_num(), 0);
std::string msg = "Result no." + std::to_string(index) + ": \n";
for (int64_t i = 0; i < NQ; i++) {
for (int64_t k = 0; k < TOPK; k++) {
@ -615,6 +616,7 @@ TEST_F(RpcHandlerTest, COMBINE_SEARCH_BINARY_TEST) {
int64_t index = 0;
for (auto& result_ptr : result_array) {
ASSERT_NE(result_ptr->ids_size(), 0);
ASSERT_NE(result_ptr->row_num(), 0);
std::string msg = "Result no." + std::to_string(++index) + ": \n";
for (int64_t i = 0; i < NQ; i++) {
for (int64_t k = 0; k < TOPK; k++) {

View File

@ -58,6 +58,8 @@ InsertEntities(std::shared_ptr<milvus::Connection>& conn) {
milvus::Status stat = conn->Insert(COLLECTION_NAME, "", entity_array, record_ids);
std::cout << "InsertEntities function call status: " << stat.message() << std::endl;
std::cout << "Returned id array count: " << record_ids.size() << std::endl;
stat = conn->FlushCollection(COLLECTION_NAME);
}
return true;