summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeir Storli <geirstorli@yahoo.no>2016-08-04 15:35:42 +0200
committerGitHub <noreply@github.com>2016-08-04 15:35:42 +0200
commitfb67e1d9300d80e9c4fa9e3c144c9f7406da9bb6 (patch)
tree26f56a9671c2cb205712ba1edff8d83de0287880
parente4de48dc7ba44c9066c56d7a0bbc6174f2ba4ca1 (diff)
parent91100964e750ae6ccf901e0d91dfb360888ebf8c (diff)
Merge pull request #380 from yahoo/toregge/stabilize-unit-tests
Avoid spurious failures due to threads sometimes
-rw-r--r--searchcore/src/tests/proton/flushengine/flushengine.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/searchcore/src/tests/proton/flushengine/flushengine.cpp b/searchcore/src/tests/proton/flushengine/flushengine.cpp
index add89d5fc58..a453958ab10 100644
--- a/searchcore/src/tests/proton/flushengine/flushengine.cpp
+++ b/searchcore/src/tests/proton/flushengine/flushengine.cpp
@@ -524,17 +524,21 @@ 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);
- // [ 10, 25 ], [ 10, 25, 25 ] and [ 10, 20, 25 ] are legal histories
+ // [ 10, 25 ], [10, 10, 25], [ 10, 25, 25 ] and [ 10, 20, 25 ] are
+ // legal histories
FlushDoneHistory fooHFlushDoneHistory(fooH->getFlushDoneHistory());
if (fooHFlushDoneHistory != FlushDoneHistory({ 10, 25 }) &&
+ fooHFlushDoneHistory != FlushDoneHistory({ 10, 10, 25 }) &&
fooHFlushDoneHistory != FlushDoneHistory({ 10, 25, 25 })) {
EXPECT_EQUAL(FlushDoneHistory({ 10, 20, 25 }), fooHFlushDoneHistory);
}
EXPECT_TRUE(barH->_done.await(LONG_TIMEOUT));
EXPECT_EQUAL(20ul, barH->_oldestSerial);
- // [ 5, 20 ], [ 5, 20, 20 ] and [ 5, 15, 20 ] are legal histories
+ // [ 5, 20 ], [5, 5, 20], [ 5, 20, 20 ] and [ 5, 15, 20 ] are
+ // legal histories
FlushDoneHistory barHFlushDoneHistory(barH->getFlushDoneHistory());
if (barHFlushDoneHistory != FlushDoneHistory({ 5, 20 }) &&
+ barHFlushDoneHistory != FlushDoneHistory({ 5, 5, 20 }) &&
barHFlushDoneHistory != FlushDoneHistory({ 5, 20, 20 })) {
EXPECT_EQUAL(FlushDoneHistory({ 5, 15, 20 }), barHFlushDoneHistory);
}