diff options
author | Tor Egge <Tor.Egge@yahooinc.com> | 2023-07-10 17:29:01 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@yahooinc.com> | 2023-07-10 17:29:01 +0200 |
commit | 18b5d27824b9b7864f673625d8ecf49d257e87fb (patch) | |
tree | 06cc474d9e45fd6200b73b42813445cfcc4dda2c | |
parent | 0616f723e7ef6d7e32fde2f34c2a31794218b80f (diff) |
Handle missed sample of oldest serial.
-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)) |