This is an automated email from the ASF dual-hosted git repository.

laiyingchun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus.git


The following commit(s) were added to refs/heads/master by this push:
     new 4a98e96f1 fix: specify the 'single_master_cluster' cluster for 
recovery_test (#1839)
4a98e96f1 is described below

commit 4a98e96f14d9dfd7c36a5a6055dafc1f1106c0ae
Author: liguohao <[email protected]>
AuthorDate: Wed Jan 10 23:38:29 2024 +0800

    fix: specify the 'single_master_cluster' cluster for recovery_test (#1839)
---
 src/test/function_test/recovery/test_recovery.cpp | 5 +++++
 src/test/function_test/utils/test_util.cpp        | 4 ++--
 src/test/function_test/utils/test_util.h          | 3 ++-
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/test/function_test/recovery/test_recovery.cpp 
b/src/test/function_test/recovery/test_recovery.cpp
index a2f59e709..479449884 100644
--- a/src/test/function_test/recovery/test_recovery.cpp
+++ b/src/test/function_test/recovery/test_recovery.cpp
@@ -20,6 +20,7 @@
 #include <fmt/core.h>
 #include <chrono>
 #include <iostream>
+#include <map>
 #include <memory>
 #include <string>
 #include <thread>
@@ -65,6 +66,10 @@ protected:
     }
 
 public:
+    // The cluster name "single_master_cluster" (see 
src/test/function_test/config.ini) means the
+    // cluster has only one meta server, while "onebox" means the cluster has 
3 meta servers.
+    recovery_test() : test_util(std::map<std::string, std::string>(), 
"single_master_cluster") {}
+
     std::vector<dsn::rpc_address> get_rpc_address_list(const std::vector<int> 
ports)
     {
         std::vector<dsn::rpc_address> result;
diff --git a/src/test/function_test/utils/test_util.cpp 
b/src/test/function_test/utils/test_util.cpp
index d748f8e3c..5d061582c 100644
--- a/src/test/function_test/utils/test_util.cpp
+++ b/src/test/function_test/utils/test_util.cpp
@@ -62,12 +62,12 @@ using std::vector;
 
 namespace pegasus {
 
-test_util::test_util(map<string, string> create_envs)
+test_util::test_util(map<string, string> create_envs, const std::string 
&cluster_name)
     : kOpNames({{test_util::OperateDataType::kSet, "set"},
                 {test_util::OperateDataType::kGet, "get"},
                 {test_util::OperateDataType::kDelete, "delete"},
                 {test_util::OperateDataType::kCheckNotFound, "check not 
found"}}),
-      kClusterName("onebox"),
+      kClusterName(cluster_name),
       kHashkeyPrefix("hashkey_"),
       kSortkey("sortkey"),
       kValuePrefix("value_"),
diff --git a/src/test/function_test/utils/test_util.h 
b/src/test/function_test/utils/test_util.h
index a40f2a579..a0d98ce19 100644
--- a/src/test/function_test/utils/test_util.h
+++ b/src/test/function_test/utils/test_util.h
@@ -49,7 +49,8 @@ class pegasus_client;
 class test_util : public ::testing::Test
 {
 public:
-    test_util(std::map<std::string, std::string> create_envs = {});
+    test_util(std::map<std::string, std::string> create_envs = {},
+              const std::string &cluster_name = "onebox");
     virtual ~test_util();
 
     static void SetUpTestCase();


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to