github-actions[bot] commented on code in PR #31415:
URL: https://github.com/apache/doris/pull/31415#discussion_r1503730789


##########
cloud/test/meta_service_test.cpp:
##########
@@ -302,6 +302,60 @@
         sp->disable_processing();
     }
 
+    // case: normal create instance without obj info and hdfs info
+    {
+        brpc::Controller cntl;
+        CreateInstanceRequest req;
+        req.set_instance_id("test_instance");
+        req.set_user_id("test_user");
+        req.set_name("test_name");
+
+        auto sp = SyncPoint::get_instance();
+        sp->set_call_back("encrypt_ak_sk:get_encryption_key_ret",
+                          [](void* p) { *reinterpret_cast<int*>(p) = 0; });
+        sp->set_call_back("encrypt_ak_sk:get_encryption_key",
+                          [](void* p) { *reinterpret_cast<std::string*>(p) = 
"test"; });
+        sp->set_call_back("encrypt_ak_sk:get_encryption_key_id",
+                          [](void* p) { *reinterpret_cast<int*>(p) = 1; });
+        sp->enable_processing();
+        CreateInstanceResponse res;
+        
meta_service->create_instance(reinterpret_cast<::google::protobuf::RpcController*>(&cntl),
+                                      &req, &res, nullptr);
+        ASSERT_EQ(res.status().code(), MetaServiceCode::OK);
+        sp->clear_all_call_backs();
+        sp->clear_trace();
+        sp->disable_processing();
+    }
+
+    // case: normal create instance with hdfs info
+    {
+        brpc::Controller cntl;
+        CreateInstanceRequest req;
+        req.set_instance_id("test_instance");
+        req.set_user_id("test_user");
+        req.set_name("test_name");
+        HdfsParams hdfs;
+        hdfs.set_fs_name("test_name_node");
+        hdfs.set_user("test_user");
+        req.mutable_hdfs_info()->CopyFrom(hdfs);
+
+        auto sp = SyncPoint::get_instance();

Review Comment:
   warning: 'auto sp' can be declared as 'auto *sp' [readability-qualified-auto]
   
   ```suggestion
           auto *sp = SyncPoint::get_instance();
   ```
   



##########
cloud/test/meta_service_test.cpp:
##########
@@ -302,6 +302,60 @@ TEST(MetaServiceTest, CreateInstanceTest) {
         sp->disable_processing();
     }
 
+    // case: normal create instance without obj info and hdfs info
+    {
+        brpc::Controller cntl;
+        CreateInstanceRequest req;
+        req.set_instance_id("test_instance");
+        req.set_user_id("test_user");
+        req.set_name("test_name");
+
+        auto sp = SyncPoint::get_instance();

Review Comment:
   warning: 'auto sp' can be declared as 'auto *sp' [readability-qualified-auto]
   
   ```suggestion
           auto *sp = SyncPoint::get_instance();
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to