diff options
author | Tor Egge <Tor.Egge@yahoo-inc.com> | 2016-08-04 13:29:11 +0000 |
---|---|---|
committer | Tor Egge <Tor.Egge@yahoo-inc.com> | 2016-08-04 13:29:11 +0000 |
commit | 91100964e750ae6ccf901e0d91dfb360888ebf8c (patch) | |
tree | 26f56a9671c2cb205712ba1edff8d83de0287880 /searchcore/src/tests/proton/flushengine | |
parent | e4de48dc7ba44c9066c56d7a0bbc6174f2ba4ca1 (diff) |
Avoid spurious failures due to threads sometimes
completing in different order.
Diffstat (limited to 'searchcore/src/tests/proton/flushengine')
-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); } |