From: Andrii Grynenko Date: Sat, 12 Nov 2016 02:12:11 +0000 (-0800) Subject: Make Observer.Stress test not fail under load X-Git-Tag: v2016.11.14.00~5 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5b8add09a804f52169f96db1ee73e33acf8a56ae;p=folly.git Make Observer.Stress test not fail under load Reviewed By: marcinpe Differential Revision: D4171655 fbshipit-source-id: e6ef33c50d5d91e05250520171c959a893470460 --- diff --git a/folly/experimental/observer/test/ObserverTest.cpp b/folly/experimental/observer/test/ObserverTest.cpp index f540ffa9..edb6c11d 100644 --- a/folly/experimental/observer/test/ObserverTest.cpp +++ b/folly/experimental/observer/test/ObserverTest.cpp @@ -237,7 +237,9 @@ TEST(Observer, Stress) { values.withRLock([numIters = numIters](const std::vector& values) { EXPECT_EQ(numIters * 10, values.back()); EXPECT_LT(values.size(), numIters / 2); - EXPECT_GT(values.size(), 10); + + EXPECT_EQ(0, values[0]); + EXPECT_EQ(numIters * 10, values.back()); for (auto value : values) { EXPECT_EQ(0, value % 10);