@@ -367,6 +367,17 @@ TYPED_TEST(CoordinationTest, TestRemoveRecursiveRequest)
367367 }
368368}
369369
370+ namespace
371+ {
372+ Coordination::RequestPtr makeRemoveRecursiveRequest (const std::string & path, uint32_t remove_nodes_limit)
373+ {
374+ auto request = std::make_shared<Coordination::ZooKeeperRemoveRecursiveRequest>();
375+ request->path = path;
376+ request->remove_nodes_limit = remove_nodes_limit;
377+ return request;
378+ }
379+ }
380+
370381TYPED_TEST (CoordinationTest, TestRemoveRecursiveInMultiRequest)
371382{
372383 using namespace DB ;
@@ -436,7 +447,7 @@ TYPED_TEST(CoordinationTest, TestRemoveRecursiveInMultiRequest)
436447 int new_zxid = ++zxid;
437448 auto ops = prepare_create_tree ();
438449
439- ops.push_back (zkutil:: makeRemoveRecursiveRequest (" /A" , 4 ));
450+ ops.push_back (makeRemoveRecursiveRequest (" /A" , 4 ));
440451 const auto request = std::make_shared<ZooKeeperMultiRequest>(ops, ACLs{});
441452
442453 storage.preprocessRequest (request, 1 , 0 , new_zxid);
@@ -457,7 +468,7 @@ TYPED_TEST(CoordinationTest, TestRemoveRecursiveInMultiRequest)
457468 auto ops = prepare_create_tree ();
458469
459470 ops.push_back (zkutil::makeRemoveRequest (" /A/C" , -1 ));
460- ops.push_back (zkutil:: makeRemoveRecursiveRequest (" /A" , 3 ));
471+ ops.push_back (makeRemoveRecursiveRequest (" /A" , 3 ));
461472 const auto request = std::make_shared<ZooKeeperMultiRequest>(ops, ACLs{});
462473
463474 storage.preprocessRequest (request, 1 , 0 , new_zxid);
@@ -497,7 +508,7 @@ TYPED_TEST(CoordinationTest, TestRemoveRecursiveInMultiRequest)
497508 int remove_zxid = ++zxid;
498509 ops = {
499510 zkutil::makeRemoveRequest (" /A/C" , -1 ),
500- zkutil:: makeRemoveRecursiveRequest (" /A" , 3 ),
511+ makeRemoveRecursiveRequest (" /A" , 3 ),
501512 };
502513 const auto remove_request = std::make_shared<ZooKeeperMultiRequest>(ops, ACLs{});
503514
@@ -528,7 +539,7 @@ TYPED_TEST(CoordinationTest, TestRemoveRecursiveInMultiRequest)
528539 int remove_zxid = ++zxid;
529540 ops = {
530541 zkutil::makeSetRequest (" /A/B" , " " , -1 ),
531- zkutil:: makeRemoveRecursiveRequest (" /A" , 3 ),
542+ makeRemoveRecursiveRequest (" /A" , 3 ),
532543 };
533544 auto remove_request = std::make_shared<ZooKeeperMultiRequest>(ops, ACLs{});
534545 storage.preprocessRequest (remove_request, 1 , 0 , remove_zxid);
@@ -539,7 +550,7 @@ TYPED_TEST(CoordinationTest, TestRemoveRecursiveInMultiRequest)
539550
540551 // / Big limit
541552 remove_zxid = ++zxid;
542- ops[1 ] = zkutil:: makeRemoveRecursiveRequest (" /A" , 4 );
553+ ops[1 ] = makeRemoveRecursiveRequest (" /A" , 4 );
543554 remove_request = std::make_shared<ZooKeeperMultiRequest>(ops, ACLs{});
544555 storage.preprocessRequest (remove_request, 1 , 0 , remove_zxid);
545556 remove_responses = storage.processRequest (remove_request, 1 , remove_zxid);
@@ -562,7 +573,7 @@ TYPED_TEST(CoordinationTest, TestRemoveRecursiveInMultiRequest)
562573 zkutil::makeCreateRequest (" /A" , " " , zkutil::CreateMode::Persistent),
563574 zkutil::makeCreateRequest (" /A/B" , " " , zkutil::CreateMode::Persistent),
564575 zkutil::makeCreateRequest (" /A/CCCCCCCCCCCC" , " " , zkutil::CreateMode::Persistent),
565- zkutil:: makeRemoveRecursiveRequest (" /A" , 3 ),
576+ makeRemoveRecursiveRequest (" /A" , 3 ),
566577 };
567578 auto remove_request = std::make_shared<ZooKeeperMultiRequest>(ops, ACLs{});
568579 storage.preprocessRequest (remove_request, 1 , 0 , new_zxid);
0 commit comments