Skip to content

Commit 21f1b52

Browse files
Merge 3a8349c into c83be65
2 parents c83be65 + 3a8349c commit 21f1b52

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

ydb/core/persqueue/ut/partition_ut.cpp

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ TPartition* TPartitionFixture::CreatePartitionActor(const TPartitionId& id,
352352
config.MeteringMode);
353353
Config.SetLocalDC(true);
354354

355-
NPersQueue::TTopicNamesConverterFactory factory(true, "/Root/PQ", "dc1");
355+
NPersQueue::TTopicNamesConverterFactory factory(Ctx->Runtime->GetAppData(0).PQConfig.GetTopicsAreFirstClassCitizen(), "/Root/PQ", "dc1");
356356
TopicConverter = factory.MakeTopicConverter(Config);
357357
TActorId quoterId;
358358
if (Ctx->Runtime->GetAppData(0).PQConfig.GetQuotingConfig().GetEnableQuoting()) {
@@ -1324,6 +1324,8 @@ class TPartitionTxTestHelper : public TPartitionFixture {
13241324
void ExpectNoBatchCompletion();
13251325
void WaitBatchCompletion(ui64 userActsCount);
13261326
void ResetBatchCompletion();
1327+
1328+
void NonConflictingActsBatchOkTest();
13271329
};
13281330

13291331
ui64 TPartitionTxTestHelper::MakeAndSendNormalOffsetCommit(ui64 client, ui64 offset) {
@@ -1370,6 +1372,11 @@ void TPartitionTxTestHelper::SendWriteInfoResponseImpl(const TActorId& supportiv
13701372
auto iter = this->WriteInfoData.find(supportiveId);
13711373
Y_ABORT_UNLESS(!iter.IsEnd());
13721374
reply->SrcIdInfo = iter->second;
1375+
reply->BytesWrittenTotal = 1;
1376+
reply->BytesWrittenGrpc = 1;
1377+
reply->BytesWrittenUncompressed = 1;
1378+
reply->MessagesWrittenTotal = 1;
1379+
reply->MessagesWrittenGrpc = 1;
13731380
SendEvent(reply, supportiveId, partitionId);
13741381
}
13751382

@@ -2549,7 +2556,7 @@ Y_UNIT_TEST_F(DataTxCalcPredicateOrder, TPartitionTxTestHelper)
25492556
WaitCommitDone(tx2);
25502557
}
25512558

2552-
Y_UNIT_TEST_F(NonConflictingActsBatchOk, TPartitionTxTestHelper) {
2559+
void TPartitionTxTestHelper::NonConflictingActsBatchOkTest() {
25532560
TTxBatchingTestParams params {.WriterSessions{"src3", "src4"}};
25542561
Init(std::move(params));
25552562
ResetBatchCompletion();
@@ -2592,6 +2599,14 @@ Y_UNIT_TEST_F(NonConflictingActsBatchOk, TPartitionTxTestHelper) {
25922599
WaitImmediateTxComplete(immTx2, true);
25932600
WaitCommitDone(tx3);
25942601
}
2602+
Y_UNIT_TEST_F(TestNonConflictingActsBatchOk, TPartitionTxTestHelper) {
2603+
NonConflictingActsBatchOkTest();
2604+
}
2605+
2606+
Y_UNIT_TEST_F(TestTxBatchInFederation, TPartitionTxTestHelper) {
2607+
Ctx->Runtime->GetAppData(0).PQConfig.SetTopicsAreFirstClassCitizen(false);
2608+
NonConflictingActsBatchOkTest();
2609+
}
25952610

25962611
Y_UNIT_TEST_F(ConflictingActsInSeveralBatches, TPartitionTxTestHelper) {
25972612
TTxBatchingTestParams params {.WriterSessions{"src1", "src4"},.EndOffset=1};
@@ -3125,6 +3140,8 @@ Y_UNIT_TEST_F(TestBatchingWithProposeConfig, TPartitionTxTestHelper) {
31253140
WaitImmediateTxComplete(immTx2, true);
31263141
}
31273142

3143+
3144+
31283145
Y_UNIT_TEST_F(GetUsedStorage, TPartitionFixture) {
31293146
auto* actor = CreatePartition({
31303147
.Partition=TPartitionId{2, TWriteId{0, 10}, 100'001},

0 commit comments

Comments
 (0)