Skip to content

Commit 27a3c6f

Browse files
committed
fix
1 parent f1271f9 commit 27a3c6f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ydb/core/persqueue/ut/ut_with_sdk/topic_ut.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,8 @@ Y_UNIT_TEST_SUITE(WithSDK) {
445445
};
446446

447447
{
448+
bool committed = false;
449+
448450
auto r = setup.Read(TEST_TOPIC, TEST_CONSUMER, [&](auto& x) {
449451
for (auto & m: x.GetMessages()) {
450452
if (x.GetPartitionSession()->GetPartitionId() == 0 && m.GetOffset() == 1) {
@@ -456,13 +458,16 @@ Y_UNIT_TEST_SUITE(WithSDK) {
456458
setup.Write("message-1-2", 1);
457459
} else if (x.GetPartitionSession()->GetPartitionId() == 1 && m.GetOffset() == 0) {
458460
m.Commit();
461+
committed = true;
459462
return false;
460463
}
461464
}
462465

463466
return true;
464467
});
465468

469+
UNIT_ASSERT(committed);
470+
466471
Sleep(TDuration::Seconds(3));
467472

468473
// Commit hasn`t applyed because messages from the parent partitions has`t been committed

0 commit comments

Comments
 (0)