Skip to content

Commit 01c07fc

Browse files
Fix tests
1 parent 741f19a commit 01c07fc

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

ydb/services/persqueue_v1/persqueue_new_schemecache_ut.cpp

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ namespace NKikimr::NPersQueueTests {
223223
Sleep(TDuration::MilliSeconds(10));
224224
}
225225

226-
// Ts and firstOffset and expectingQuantities will be set in first iteration of reading by received messages.
226+
// Ts and firstOffset and expectingQuantities will be set in first iteration of reading by received messages.
227227
// Each will contains shifts from the message: before, equals and after.
228228
// It allow check reading from different shift. First iteration read from zero.
229229
TVector<TInstant> ts { TInstant::Zero() };
@@ -254,10 +254,10 @@ namespace NKikimr::NPersQueueTests {
254254
ui32 lastOffset = 0;
255255

256256
settings.EventHandlers_.SimpleDataHandlers([&](NYdb::NPersQueue::TReadSessionEvent::TDataReceivedEvent& event) mutable {
257-
Cerr << ">>>>> Iteration: " << i << " TDataReceivedEvent: " << event.DebugString(false)
257+
Cerr << ">>>>> Iteration: " << i << " TDataReceivedEvent: " << event.DebugString(false)
258258
<< " size=" << event.GetMessages().size() << Endl << Flush;
259259
for (const auto& msg : event.GetMessages()) {
260-
Cerr << ">>>>> Iteration: " << i << " Got message: " << msg.GetData().substr(0, 16)
260+
Cerr << ">>>>> Iteration: " << i << " Got message: " << msg.GetData().substr(0, 16)
261261
<< " :: " << msg.DebugString(false) << Endl << Flush;
262262

263263
auto count = ++map[msg.GetData()];
@@ -281,12 +281,12 @@ namespace NKikimr::NPersQueueTests {
281281
} else {
282282
if (map.size() == 1) {
283283
auto expectedOffset = firstOffset[i];
284-
UNIT_ASSERT_EQUAL_C(msg.GetOffset(), expectedOffset, "Iteration: " << i
285-
<< " Expected first message offset " << expectedOffset
284+
UNIT_ASSERT_EQUAL_C(msg.GetOffset(), expectedOffset, "Iteration: " << i
285+
<< " Expected first message offset " << expectedOffset
286286
<< " but got " << msg.GetOffset());
287287
} else {
288-
UNIT_ASSERT_C(lastOffset < msg.GetOffset(), "Iteration: " << i
289-
<< " unexpected offset order. Last offset " << lastOffset
288+
UNIT_ASSERT_C(lastOffset < msg.GetOffset(), "Iteration: " << i
289+
<< " unexpected offset order. Last offset " << lastOffset
290290
<< " Message offset " << msg.GetOffset());
291291
}
292292

@@ -310,8 +310,8 @@ namespace NKikimr::NPersQueueTests {
310310

311311
if (i == 0) {
312312
for (ui32 j = 1; j < ts.size(); ++j) {
313-
Cerr << ">>>>> Planed iteration: " << j
314-
<< ". Start reading from time: " << ts[j]
313+
Cerr << ">>>>> Planed iteration: " << j
314+
<< ". Start reading from time: " << ts[j]
315315
<< ". Expected first message offset: " << firstOffset[j]
316316
<< ". Expected message quantity: " << expectingQuantities[j] << Endl;
317317
}
@@ -462,6 +462,8 @@ namespace NKikimr::NPersQueueTests {
462462
"topic.read.lag_milliseconds",
463463
"topic.write.bytes",
464464
"topic.write.messages",
465+
"topic.write.discarded_bytes",
466+
"topic.write.discarded_messages",
465467
"api.grpc.topic.stream_write.bytes",
466468
"topic.write.partition_throttled_milliseconds",
467469
"topic.write.message_size_bytes",

ydb/services/persqueue_v1/persqueue_ut.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3681,6 +3681,8 @@ Y_UNIT_TEST_SUITE(TPersQueueTest) {
36813681
{
36823682
"BytesWrittenOriginal",
36833683
"CompactedBytesWrittenOriginal",
3684+
"DiscardedBytes",
3685+
"DiscardedMessages",
36843686
"MessagesWrittenOriginal",
36853687
"UncompressedBytesWrittenOriginal"
36863688
},

0 commit comments

Comments
 (0)