Skip to content

Commit f74c4e8

Browse files
nshestakovGazizonoki
authored andcommitted
Moved commit "Add tests for pqv1" from ydb repo
1 parent 588e6a9 commit f74c4e8

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/client/topic/ut/local_partition_ut.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -677,18 +677,19 @@ namespace NYdb::NTopic::NTests {
677677
.MessageGroupId(TEST_MESSAGE_GROUP_ID)
678678
.DirectWriteToPartition(true);
679679
auto writeSession = client.CreateSimpleBlockingWriteSession(writeSettings);
680-
TTestReadSession ReadSession("Session-0", client, 2);
680+
auto ReadSession = NPQ::NTest::CreateTestReadSession({ .Name="Session-0", .Setup=setup, .Sdk = NPQ::NTest::SdkVersion::Topic, .ExpectedMessagesCount = 2 });
681681

682-
UNIT_ASSERT(writeSession->Write(Msg("message_1.1", 2)));
682+
683+
UNIT_ASSERT(writeSession->Write(NPQ::NTest::Msg("message_1.1", 2)));
683684

684685
ui64 txId = 1006;
685-
SplitPartition(setup, ++txId, 0, "a");
686+
NPQ::NTest::SplitPartition(setup, ++txId, 0, "a");
686687

687-
UNIT_ASSERT(writeSession->Write(Msg("message_1.2", 3)));
688+
UNIT_ASSERT(writeSession->Write(NPQ::NTest::Msg("message_1.2", 3)));
688689

689-
ReadSession.WaitAllMessages();
690+
ReadSession->WaitAllMessages();
690691

691-
for (const auto& info : ReadSession.Impl->ReceivedMessages) {
692+
for (const auto& info : ReadSession->GetReceivedMessages()) {
692693
if (info.Data == "message_1.1") {
693694
UNIT_ASSERT_EQUAL(0, info.PartitionId);
694695
UNIT_ASSERT_EQUAL(2, info.SeqNo);
@@ -724,7 +725,7 @@ namespace NYdb::NTopic::NTests {
724725
auto const events = tracingBackend->GetEvents();
725726
UNIT_ASSERT(expected.Matches(events));
726727

727-
ReadSession.Close();
728+
ReadSession->Close();
728729
}
729730
}
730731
}

0 commit comments

Comments
 (0)