Skip to content

Commit

Permalink
fix test, we should wait until scrubbing will definitely scan all disk (
Browse files Browse the repository at this point in the history
#1694) (#1697)

* fix test, we should wait until scrubbing will definitely scan all disk

* add comment
  • Loading branch information
WilyTiger authored Jul 31, 2024
1 parent 02a9014 commit 6f434b1
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,10 @@ Y_UNIT_TEST_SUITE(TMirrorPartitionTest)
env.WriteReplica(1, range3, 'B');

iterations = 0;
while (fullCyclesCount < 3 && iterations++ < 100) {
// at this point, scrubbing may not start from the beginning,
// so we need to wait for 2 cycles to be sure that
// it has scanned the entire disk at least once
while (fullCyclesCount < 4 && iterations++ < 100) {
if (prevScrubbingProgress != 0 &&
counters.Simple.ScrubbingProgress.Value == 0)
{
Expand All @@ -1257,7 +1260,10 @@ Y_UNIT_TEST_SUITE(TMirrorPartitionTest)

// check that all ranges was resynced and there is no more mismatches
iterations = 0;
while (fullCyclesCount < 4 && iterations++ < 100) {
// at this point, scrubbing may not start from the beginning,
// so we need to wait for 2 cycles to be sure that
// it has scanned the entire disk at least once
while (fullCyclesCount < 6 && iterations++ < 100) {
if (prevScrubbingProgress != 0 &&
counters.Simple.ScrubbingProgress.Value == 0)
{
Expand Down

0 comments on commit 6f434b1

Please sign in to comment.