Skip to content

Commit

Permalink
Moved commit "The TEvProposePartitionConfig message is sent only to t…
Browse files Browse the repository at this point in the history
…he main partitions" from ydb repo
  • Loading branch information
Alek5andr-Kotov authored and Gazizonoki committed Sep 23, 2024
1 parent d24417d commit b888552
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/client/topic/ut/topic_to_table_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ void TFixture::SetUp(NUnitTest::TTestContext&)
{
NKikimr::Tests::TServerSettings settings = TTopicSdkTestSetup::MakeServerSettings();
settings.SetEnableTopicServiceTx(true);
settings.SetEnablePQConfigTransactionsAtSchemeShard(true);

Setup = std::make_unique<TTopicSdkTestSetup>(TEST_CASE_NAME, settings);

Expand Down Expand Up @@ -2097,6 +2098,26 @@ Y_UNIT_TEST_F(WriteToTopic_Demo_38, TFixture)
WriteMessagesInTx(0, 1);
}

Y_UNIT_TEST_F(WriteToTopic_Demo_39, TFixture)
{
CreateTopic("topic_A", TEST_CONSUMER);

NTable::TSession tableSession = CreateTableSession();
NTable::TTransaction tx = BeginTx(tableSession);

WriteToTopic("topic_A", TEST_MESSAGE_GROUP_ID, "message #1", &tx);
WriteToTopic("topic_A", TEST_MESSAGE_GROUP_ID, "message #2", &tx);

WaitForAcks("topic_A", TEST_MESSAGE_GROUP_ID);

AddConsumer("topic_A", {"consumer"});

CommitTx(tx, EStatus::SUCCESS);

auto messages = ReadFromTopic("topic_A", "consumer", TDuration::Seconds(2));
UNIT_ASSERT_VALUES_EQUAL(messages.size(), 2);
}

Y_UNIT_TEST_F(ReadRuleGeneration, TFixture)
{
// There was a server
Expand Down

0 comments on commit b888552

Please sign in to comment.