aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorildar-khisam <ikhis@ydb.tech>2022-07-12 11:25:31 +0300
committerildar-khisam <ikhis@ydb.tech>2022-07-12 11:25:31 +0300
commitc294cbb440925d60778a83e07309347f8b7f04dd (patch)
tree72690f78817be9486cf1d170c5e971d4c5d792be
parentcf0b81d327ddae0e78a27e0809c28d381476d765 (diff)
downloadydb-c294cbb440925d60778a83e07309347f8b7f04dd.tar.gz
shrink RetentionBorderReading test
shrink RetentionBorderReading test to avoid oom
-rw-r--r--ydb/services/persqueue_v1/persqueue_ut.cpp72
1 files changed, 0 insertions, 72 deletions
diff --git a/ydb/services/persqueue_v1/persqueue_ut.cpp b/ydb/services/persqueue_v1/persqueue_ut.cpp
index eb86b28ce0..55965fea9d 100644
--- a/ydb/services/persqueue_v1/persqueue_ut.cpp
+++ b/ydb/services/persqueue_v1/persqueue_ut.cpp
@@ -4320,77 +4320,5 @@ Y_UNIT_TEST_SUITE(TPersQueueTest) {
}
}
-
-
- Y_UNIT_TEST(RetentionBorderReading) {
- NPersQueue::TTestServer server;
-
- server.EnableLogs({ NKikimrServices::PQ_WRITE_PROXY});
-
- std::shared_ptr<grpc::Channel> Channel_;
- std::unique_ptr<Ydb::PersQueue::V1::PersQueueService::Stub> StubP_;
-
- {
- Channel_ = grpc::CreateChannel("localhost:" + ToString(server.GrpcPort), grpc::InsecureChannelCredentials());
- StubP_ = Ydb::PersQueue::V1::PersQueueService::NewStub(Channel_);
- }
-
- do {
- CreateTopicRequest request;
- CreateTopicResponse response;
- request.set_path("/Root/PQ/rt3.dc1--topic");
- auto props = request.mutable_settings();
- props->set_partitions_count(1);
- props->set_supported_format(Ydb::PersQueue::V1::TopicSettings::FORMAT_BASE);
- props->set_retention_period_ms(TDuration::Days(1).MilliSeconds());
- props->set_max_partition_storage_size(2000000000);
- props->set_retention_storage_bytes(30000000);
-
- props->set_max_partition_write_speed(10000000);
- props->set_max_partition_write_burst(10000000);
- (*props->mutable_attributes())["_allow_unauthenticated_read"] = "true";
-
- grpc::ClientContext rcontext;
-
- auto status = StubP_->CreateTopic(&rcontext, request, &response);
-
- UNIT_ASSERT(status.ok());
- CreateTopicResult res;
- response.operation().result().UnpackTo(&res);
- Cerr << response << "\n" << res << "\n";
- if (response.operation().status() == Ydb::StatusIds::UNAVAILABLE) {
- Sleep(TDuration::Seconds(1));
- continue;
- }
- Cerr << response.operation() << "\n";
- UNIT_ASSERT_VALUES_EQUAL(response.operation().status(), Ydb::StatusIds::SUCCESS);
- break;
- } while (true);
-
- Cerr << "Topic created\n";
- server.AnnoyingClient->AddTopic("rt3.dc1--topic");
- while (server.AnnoyingClient->TopicCreated("rt3.dc1--topic") == 0) Sleep(TDuration::Seconds(1));
- Cerr << "Topic really created\n";
-
- auto driver = server.AnnoyingClient->GetDriver();
-
- auto writer = CreateSimpleWriter(*driver, "topic", "source1", {}, TString("raw"));
- bool res = writer->Write(TString(15 * 1024 * 1024, 'a'), 1);
- UNIT_ASSERT(res);
- writer->Close();
-
- writer = CreateSimpleWriter(*driver, "topic", "source", {}, TString("raw"));
- for (int i = 1; i < 500; ++i) {
- bool res = writer->Write(TString((i % 30) * 1024 * 1024 + 10, 'a'), i);
- UNIT_ASSERT(res);
- }
- Cerr << "ALL WRITTEN TO WRITER\n";
- for (int i = 1; i < 300; ++i) {
- auto info = server.AnnoyingClient->ReadFromPQ({"rt3.dc1--topic", 0, 0, 2, "user", (TInstant::Now()).MilliSeconds() - 300}, 0, "", NMsgBusProxy::MSTATUS_OK);
- UNIT_ASSERT(info.Values.size() >= 1);
- }
- writer->Close();
- }
-
}
}