diff options
author | Vlad Kuznetsov <va-kuznecov@ydb.tech> | 2024-10-31 10:32:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-31 10:32:42 +0100 |
commit | c475dc3118e8a27bdd5e3593e2660ec910078cd1 (patch) | |
tree | 2a5d8dc16eba69ead1f596adea23430af4abcf67 | |
parent | 6a5ed96a78b9a1a79a45e64c3d38fe25c696b15f (diff) | |
download | ydb-c475dc3118e8a27bdd5e3593e2660ec910078cd1.tar.gz |
Fix flacky test TPDiskTest::TestMultipleLogSpliceNonceJump (#11125)
-rw-r--r-- | ydb/core/blobstorage/pdisk/blobstorage_pdisk_ut.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ydb/core/blobstorage/pdisk/blobstorage_pdisk_ut.cpp b/ydb/core/blobstorage/pdisk/blobstorage_pdisk_ut.cpp index 9d92c5258a..f78ab4435e 100644 --- a/ydb/core/blobstorage/pdisk/blobstorage_pdisk_ut.cpp +++ b/ydb/core/blobstorage/pdisk/blobstorage_pdisk_ut.cpp @@ -317,7 +317,7 @@ Y_UNIT_TEST_SUITE(TPDiskTest) { } } while (!testCtx.GetPDisk()->CommonLogger->OnFirstSectorInChunk()); } - // expect log chunks list looks like 1 -> 2 -> ... -> 6 (empty) + // expect log chunks list looks like 1 -> 2 -> ... -> 9 (empty) testCtx.RestartPDiskSync(); // writes NonceJump UNIT_ASSERT_C(testCtx.GetPDisk()->CommonLogger->SectorIdx == 1, "To reproduce bug nonce jump record" @@ -332,9 +332,9 @@ Y_UNIT_TEST_SUITE(TPDiskTest) { NPDisk::TPDisk *pdisk = testCtx.GetPDisk(); UNIT_ASSERT_C(pdisk->LogChunks.size() == 9, pdisk->LogChunks.size()); intensiveVDisk.CutLogAllButOne(); - // 1 -> 2 -> 6 + // 1 -> 2 -> 3 -> 4 -> 5 -> 9 pdisk->PDiskThread.StopSync(); - while (pdisk->LogChunks.size() != 6) { + while (pdisk->LogChunks.size() != 6 || pdisk->IsLogChunksReleaseInflight) { pdisk->Update(); } } @@ -343,13 +343,13 @@ Y_UNIT_TEST_SUITE(TPDiskTest) { moderateVDisk.Init(); { // initiate log splicing, expect transition to be - // 1 -> 2 -> ... -> 6 + // 1 -> 2 -> 3 -> 4 -> 5 -> 9 NPDisk::TPDisk *pdisk = testCtx.GetPDisk(); UNIT_ASSERT(pdisk->LogChunks.size() == 6); moderateVDisk.CutLogAllButOne(); - // 1 -> 2 -> 6 + // 1 -> 9 pdisk->PDiskThread.StopSync(); - while (pdisk->LogChunks.size() != 2) { + while (pdisk->LogChunks.size() != 2 || pdisk->IsLogChunksReleaseInflight) { pdisk->Update(); } } |