diff options
author | Tor Egge <Tor.Egge@yahooinc.com> | 2023-07-10 18:41:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-10 18:41:55 +0200 |
commit | c4911b3f2924544e4700a1832df34ebbc03b53fc (patch) | |
tree | 01b86b6c9b9b3146471984c442c7623281a66393 | |
parent | 30225aa2d28901149cd179b24d604debc9728cce (diff) | |
parent | 18b5d27824b9b7864f673625d8ecf49d257e87fb (diff) |
Merge pull request #27733 from vespa-engine/toregge/handle-missed-sample-of-oldest-serial
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)) |