Skip to content

KIKIMR-20611 fix hanging test #1938

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions ydb/core/persqueue/ut/mirrorer_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ Y_UNIT_TEST_SUITE(TPersQueueMirrorer) {

}

srcReader->Close(TDuration::Zero());
dstReader->Close(TDuration::Zero());

// write to source topic
TVector<ui32> messagesPerPartition(partitionsCount, 0);
for (ui32 partition = 0; partition < partitionsCount; ++partition) {
Expand All @@ -163,7 +166,7 @@ Y_UNIT_TEST_SUITE(TPersQueueMirrorer) {
{"some_extra_field2", "another_value" + ToString(partition)},
{"file", "/home/user/log" + ToString(partition)}
};
auto writer = CreateSimpleWriter(*driver, srcTopic, sourceId, partition + 1, std::nullopt, std::nullopt, sessionMeta);
auto writer = CreateSimpleWriter(*driver, srcTopic, sourceId, partition + 1, std::nullopt, std::nullopt, sessionMeta);

ui64 seqNo = writer->GetInitSeqNo();

Expand Down Expand Up @@ -211,10 +214,10 @@ Y_UNIT_TEST_SUITE(TPersQueueMirrorer) {
auto dstReader = createReader(dstTopic, partition);

for (ui32 i = 0; i < messagesPerPartition[partition]; ++i) {
auto dstEvent = GetNextMessageSkipAssignment(dstReader);
auto dstEvent = GetNextMessageSkipAssignment(dstReader, TDuration::Seconds(1));
UNIT_ASSERT(dstEvent);
Cerr << "Destination read message: " << dstEvent->DebugString() << "\n";
auto srcEvent = GetNextMessageSkipAssignment(srcReader);
auto srcEvent = GetNextMessageSkipAssignment(srcReader, TDuration::Seconds(1));
UNIT_ASSERT(srcEvent);
Cerr << "Source read message: " << srcEvent->DebugString() << "\n";

Expand Down Expand Up @@ -264,7 +267,7 @@ Y_UNIT_TEST_SUITE(TPersQueueMirrorer) {
server.AnnoyingClient->CreateTopic(topicFullName, 1);

auto driver = server.AnnoyingClient->GetDriver();
auto writer = CreateSimpleWriter(*driver, topic, "src-id-test");
auto writer = CreateSimpleWriter(*driver, topic, "src-id-test");
for (auto i = 0u; i < 5; i++) {
auto res = writer->Write(TString(10, 'a'));
UNIT_ASSERT(res);
Expand Down Expand Up @@ -300,7 +303,7 @@ Y_UNIT_TEST_SUITE(TPersQueueMirrorer) {
break;
}
}

for (auto i = 0u; i < 5; i++) {
auto res = writer->Write(TString(10, 'b'));
UNIT_ASSERT(res);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,4 @@ namespace NKikimr::NPersQueueTests {
}
return {};
}


}