aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/flushengine
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@yahoo-inc.com>2016-06-17 22:19:36 +0000
committerTor Egge <Tor.Egge@yahoo-inc.com>2016-06-17 22:19:36 +0000
commit01223568a1b167276c560d2e686125320370180c (patch)
tree8135c97ed03af7b5b1cde4c1315722fab02eb6ca /searchcore/src/tests/proton/flushengine
parent4492247bff82d0a4b71cd6e40daa8561f21895b4 (diff)
Stabilize flush engine unit test.
Flush done histories can have multiple legal values when flush engine can perform more than one flush operation at a time.
Diffstat (limited to 'searchcore/src/tests/proton/flushengine')
-rw-r--r--searchcore/src/tests/proton/flushengine/flushengine.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/searchcore/src/tests/proton/flushengine/flushengine.cpp b/searchcore/src/tests/proton/flushengine/flushengine.cpp
index cb195a9cdc6..364d8bf3717 100644
--- a/searchcore/src/tests/proton/flushengine/flushengine.cpp
+++ b/searchcore/src/tests/proton/flushengine/flushengine.cpp
@@ -440,12 +440,18 @@ TEST_F("require that oldest serial is found in group", Fixture(2, IINTERVAL))
EXPECT_TRUE(fooH->_done.await(LONG_TIMEOUT));
EXPECT_EQUAL(25ul, fooH->_oldestSerial);
- EXPECT_EQUAL(std::vector<search::SerialNum>({ 10, 20, 25 }),
- fooH->_flushDoneHistory);
+ // Both [ 10, 25 ] and [ 10, 20, 25 } are legal histories
+ if (fooH->_flushDoneHistory != std::vector<search::SerialNum>({ 10, 25 })) {
+ EXPECT_EQUAL(std::vector<search::SerialNum>({ 10, 20, 25 }),
+ fooH->_flushDoneHistory);
+ }
EXPECT_TRUE(barH->_done.await(LONG_TIMEOUT));
EXPECT_EQUAL(20ul, barH->_oldestSerial);
- EXPECT_EQUAL(std::vector<search::SerialNum>({ 5, 15, 20 }),
- barH->_flushDoneHistory);
+ // Both [ 5, 20 ] and [ 5, 15, 20 } are legal histories
+ if (barH->_flushDoneHistory != std::vector<search::SerialNum>({ 5, 20 })) {
+ EXPECT_EQUAL(std::vector<search::SerialNum>({ 5, 15, 20 }),
+ barH->_flushDoneHistory);
+ }
}
TEST_F("require that target can refuse flush", Fixture(2, IINTERVAL))