Skip to content

Commit 261a919

Browse files
[*] refactoring
1 parent b3c3d01 commit 261a919

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

ydb/public/sdk/cpp/client/ydb_topic/ut/topic_to_table_ut.cpp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -953,26 +953,6 @@ void TFixture::RestartLongTxService()
953953
}
954954
}
955955

956-
Y_UNIT_TEST_F(WriteToTopic_Demo_39, TFixture)
957-
{
958-
CreateTopic("topic_A", TEST_CONSUMER);
959-
960-
NTable::TSession tableSession = CreateTableSession();
961-
NTable::TTransaction tx = BeginTx(tableSession);
962-
963-
WriteToTopic("topic_A", TEST_MESSAGE_GROUP_ID, "message #1", &tx);
964-
WriteToTopic("topic_A", TEST_MESSAGE_GROUP_ID, "message #2", &tx);
965-
966-
WaitForAcks("topic_A", TEST_MESSAGE_GROUP_ID);
967-
968-
AddConsumer("topic_A", {"consumer"});
969-
970-
CommitTx(tx, EStatus::SUCCESS);
971-
972-
auto messages = ReadFromTopic("topic_A", "consumer", TDuration::Seconds(2));
973-
UNIT_ASSERT_VALUES_EQUAL(messages.size(), 2);
974-
}
975-
976956
Y_UNIT_TEST_F(WriteToTopic_Demo_1, TFixture)
977957
{
978958
CreateTopic("topic_A");
@@ -2118,6 +2098,26 @@ Y_UNIT_TEST_F(WriteToTopic_Demo_38, TFixture)
21182098
WriteMessagesInTx(0, 1);
21192099
}
21202100

2101+
Y_UNIT_TEST_F(WriteToTopic_Demo_39, TFixture)
2102+
{
2103+
CreateTopic("topic_A", TEST_CONSUMER);
2104+
2105+
NTable::TSession tableSession = CreateTableSession();
2106+
NTable::TTransaction tx = BeginTx(tableSession);
2107+
2108+
WriteToTopic("topic_A", TEST_MESSAGE_GROUP_ID, "message #1", &tx);
2109+
WriteToTopic("topic_A", TEST_MESSAGE_GROUP_ID, "message #2", &tx);
2110+
2111+
WaitForAcks("topic_A", TEST_MESSAGE_GROUP_ID);
2112+
2113+
AddConsumer("topic_A", {"consumer"});
2114+
2115+
CommitTx(tx, EStatus::SUCCESS);
2116+
2117+
auto messages = ReadFromTopic("topic_A", "consumer", TDuration::Seconds(2));
2118+
UNIT_ASSERT_VALUES_EQUAL(messages.size(), 2);
2119+
}
2120+
21212121
Y_UNIT_TEST_F(ReadRuleGeneration, TFixture)
21222122
{
21232123
// There was a server

0 commit comments

Comments
 (0)