diff options
author | Geir Storli <geirstorli@yahoo.no> | 2016-08-04 15:35:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-04 15:35:42 +0200 |
commit | fb67e1d9300d80e9c4fa9e3c144c9f7406da9bb6 (patch) | |
tree | 26f56a9671c2cb205712ba1edff8d83de0287880 | |
parent | e4de48dc7ba44c9066c56d7a0bbc6174f2ba4ca1 (diff) | |
parent | 91100964e750ae6ccf901e0d91dfb360888ebf8c (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.cpp | 8 |
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); } |