Skip to content

Commit

Permalink
Moved commit "The value of the WriteInflightSize in the main partitio…
Browse files Browse the repository at this point in the history
…n" from ydb repo
  • Loading branch information
Alek5andr-Kotov authored and Gazizonoki committed Aug 26, 2024
1 parent 3654a3d commit 752d30e
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/client/topic/ut/topic_to_table_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1898,6 +1898,29 @@ Y_UNIT_TEST_F(WriteToTopic_Demo_27, TFixture)
}
}

Y_UNIT_TEST_F(WriteToTopic_Demo_28, TFixture)
{
// The test verifies that the `WriteInflightSize` is correctly considered for the main partition.
// Writing to the service partition does not change the `WriteInflightSize` of the main one.
CreateTopic("topic_A", TEST_CONSUMER);

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

TString message(16'000, 'a');

WriteToTopic("topic_A", TEST_MESSAGE_GROUP_ID_1, TString(16'000, 'a'), &tx, 0);
WaitForAcks("topic_A", TEST_MESSAGE_GROUP_ID_1);

CommitTx(tx, EStatus::SUCCESS);

WriteToTopic("topic_A", TEST_MESSAGE_GROUP_ID_2, TString(20'000, 'b'), nullptr, 0);
WaitForAcks("topic_A", TEST_MESSAGE_GROUP_ID_2);

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

}

}

0 comments on commit 752d30e

Please sign in to comment.