summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2016-06-18 12:11:29 +0200
committerGitHub <noreply@github.com>2016-06-18 12:11:29 +0200
commit9fbc54f37209c21e60aba28fda7ad1c6cde46411 (patch)
tree036ff34d5f890bab268b29345b330466461201d0 /searchcore
parent27b26fb41c72d7976635d8db65d4bae3dc32bd20 (diff)
parent01223568a1b167276c560d2e686125320370180c (diff)
Merge pull request #79 from yahoo/toregge/stabilize-flushengine-unit-test
Stabilize flush engine unit test.
Diffstat (limited to 'searchcore')
-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))