diff options
-rw-r--r-- | searchcore/src/tests/proton/flushengine/flushengine_test.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/searchcore/src/tests/proton/flushengine/flushengine_test.cpp b/searchcore/src/tests/proton/flushengine/flushengine_test.cpp index 054d41be89a..6cdf0c478ad 100644 --- a/searchcore/src/tests/proton/flushengine/flushengine_test.cpp +++ b/searchcore/src/tests/proton/flushengine/flushengine_test.cpp @@ -526,7 +526,12 @@ TEST_F("require that oldest serial is found", Fixture(1, IINTERVAL)) EXPECT_TRUE(handler->_done.await(LONG_TIMEOUT)); EXPECT_EQUAL(25ul, handler->_oldestSerial); FlushDoneHistory handlerFlushDoneHistory(handler->getFlushDoneHistory()); - EXPECT_EQUAL(FlushDoneHistory({ 10, 20, 25 }), handlerFlushDoneHistory); + if (handlerFlushDoneHistory.size() == 2u) { + // Lost sample of oldest serial might happen when system load is high + EXPECT_EQUAL(FlushDoneHistory({ 10, 25 }), handlerFlushDoneHistory); + } else { + EXPECT_EQUAL(FlushDoneHistory({ 10, 20, 25 }), handlerFlushDoneHistory); + } } TEST_F("require that GC targets are not considered when oldest serial is found", Fixture(1, IINTERVAL)) |