From 055048b4d31a125393af116539dda6173cb5b5c5 Mon Sep 17 00:00:00 2001 From: Ali Masarwa Date: Thu, 24 Apr 2025 11:39:37 +0300 Subject: [PATCH] RGW/standalone: fixed jenkins issues Signed-off-by: Ali Masarwa --- src/test/rgw/test_rgw_period_history.cc | 26 ++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/test/rgw/test_rgw_period_history.cc b/src/test/rgw/test_rgw_period_history.cc index 25ea87d3a2f55..4ff94b716df76 100644 --- a/src/test/rgw/test_rgw_period_history.cc +++ b/src/test/rgw/test_rgw_period_history.cc @@ -36,7 +36,7 @@ const auto current_period = make_period("5", 5, "4"); // mock puller that throws an exception if it's called struct ErrorPuller : public RGWPeriodHistory::Puller { - int pull(const DoutPrefixProvider *dpp, const std::string& id, RGWPeriod& period, optional_yield) override { + int pull(const DoutPrefixProvider *dpp, const std::string& id, RGWPeriod& period, optional_yield, rgw::sal::ConfigStore* cfgstore) override { throw std::runtime_error("unexpected call to pull"); } }; @@ -49,7 +49,7 @@ class RecordingPuller : public RGWPeriodHistory::Puller { public: explicit RecordingPuller(int error) : error(error) {} Ids ids; - int pull(const DoutPrefixProvider *dpp, const std::string& id, RGWPeriod& period, optional_yield) override { + int pull(const DoutPrefixProvider *dpp, const std::string& id, RGWPeriod& period, optional_yield, rgw::sal::ConfigStore* cfgstore) override { ids.push_back(id); return error; } @@ -57,7 +57,7 @@ class RecordingPuller : public RGWPeriodHistory::Puller { // mock puller that returns a fake period by parsing the period id struct NumericPuller : public RGWPeriodHistory::Puller { - int pull(const DoutPrefixProvider *dpp, const std::string& id, RGWPeriod& period, optional_yield) override { + int pull(const DoutPrefixProvider *dpp, const std::string& id, RGWPeriod& period, optional_yield, rgw::sal::ConfigStore* cfgstore) override { // relies on numeric period ids to divine the realm_epoch auto realm_epoch = boost::lexical_cast(id); auto predecessor = boost::lexical_cast(realm_epoch-1); @@ -135,7 +135,7 @@ TEST(PeriodHistory, PullPredecessorsBeforeCurrent) // create a disjoint history at 1 and verify that periods are requested // backwards from current_period - auto c1 = history.attach(&dp, make_period("1", 1, ""), null_yield); + auto c1 = history.attach(&dp, make_period("1", 1, ""), null_yield, nullptr); ASSERT_FALSE(c1); ASSERT_EQ(-EFAULT, c1.get_error()); ASSERT_EQ(Ids{"4"}, puller.ids); @@ -143,7 +143,7 @@ TEST(PeriodHistory, PullPredecessorsBeforeCurrent) auto c4 = history.insert(make_period("4", 4, "3")); ASSERT_TRUE(c4); - c1 = history.attach(&dp, make_period("1", 1, ""), null_yield); + c1 = history.attach(&dp, make_period("1", 1, ""), null_yield, nullptr); ASSERT_FALSE(c1); ASSERT_EQ(-EFAULT, c1.get_error()); ASSERT_EQ(Ids({"4", "3"}), puller.ids); @@ -151,7 +151,7 @@ TEST(PeriodHistory, PullPredecessorsBeforeCurrent) auto c3 = history.insert(make_period("3", 3, "2")); ASSERT_TRUE(c3); - c1 = history.attach(&dp, make_period("1", 1, ""), null_yield); + c1 = history.attach(&dp, make_period("1", 1, ""), null_yield, nullptr); ASSERT_FALSE(c1); ASSERT_EQ(-EFAULT, c1.get_error()); ASSERT_EQ(Ids({"4", "3", "2"}), puller.ids); @@ -159,7 +159,7 @@ TEST(PeriodHistory, PullPredecessorsBeforeCurrent) auto c2 = history.insert(make_period("2", 2, "1")); ASSERT_TRUE(c2); - c1 = history.attach(&dp, make_period("1", 1, ""), null_yield); + c1 = history.attach(&dp, make_period("1", 1, ""), null_yield, nullptr); ASSERT_TRUE(c1); ASSERT_EQ(Ids({"4", "3", "2"}), puller.ids); } @@ -172,22 +172,22 @@ TEST(PeriodHistory, PullPredecessorsAfterCurrent) // create a disjoint history at 9 and verify that periods are requested // backwards down to current_period - auto c9 = history.attach(&dp, make_period("9", 9, "8"), null_yield); + auto c9 = history.attach(&dp, make_period("9", 9, "8"), null_yield, nullptr); ASSERT_FALSE(c9); ASSERT_EQ(-EFAULT, c9.get_error()); ASSERT_EQ(Ids{"8"}, puller.ids); - auto c8 = history.attach(&dp, make_period("8", 8, "7"), null_yield); + auto c8 = history.attach(&dp, make_period("8", 8, "7"), null_yield, nullptr); ASSERT_FALSE(c8); ASSERT_EQ(-EFAULT, c8.get_error()); ASSERT_EQ(Ids({"8", "7"}), puller.ids); - auto c7 = history.attach(&dp, make_period("7", 7, "6"), null_yield); + auto c7 = history.attach(&dp, make_period("7", 7, "6"), null_yield, nullptr); ASSERT_FALSE(c7); ASSERT_EQ(-EFAULT, c7.get_error()); ASSERT_EQ(Ids({"8", "7", "6"}), puller.ids); - auto c6 = history.attach(&dp, make_period("6", 6, "5"), null_yield); + auto c6 = history.attach(&dp, make_period("6", 6, "5"), null_yield, nullptr); ASSERT_TRUE(c6); ASSERT_EQ(Ids({"8", "7", "6"}), puller.ids); } @@ -275,7 +275,7 @@ TEST(PeriodHistory, AttachBefore) RGWPeriodHistory history(g_ceph_context, &puller, current_period); const DoutPrefix dp(g_ceph_context, 1, "test rgw period history: "); - auto c1 = history.attach(&dp, make_period("1", 1, ""), null_yield); + auto c1 = history.attach(&dp, make_period("1", 1, ""), null_yield, nullptr); ASSERT_TRUE(c1); // verify that we pulled and merged all periods from 1-5 @@ -302,7 +302,7 @@ TEST(PeriodHistory, AttachAfter) RGWPeriodHistory history(g_ceph_context, &puller, current_period); const DoutPrefix dp(g_ceph_context, 1, "test rgw period history: "); - auto c9 = history.attach(&dp, make_period("9", 9, "8"), null_yield); + auto c9 = history.attach(&dp, make_period("9", 9, "8"), null_yield, nullptr); ASSERT_TRUE(c9); // verify that we pulled and merged all periods from 5-9 -- 2.39.5