From fa43917d8aad3fb20bcd5005c4b5cd524aeb149b Mon Sep 17 00:00:00 2001 From: James Sedgwick Date: Fri, 26 Sep 2014 08:48:09 -0700 Subject: [PATCH] fix more flakey tests Summary: fixed the one brought up in the task, and tweaked another that could theoretically cause problems Test Plan: ran, though I have not been able to repro the Reviewed By: njormrod@fb.com Subscribers: fugalh, njormrod FB internal diff: D1575632 Tasks: 5225808 --- .../wangle/concurrent/test/ThreadPoolExecutorTest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/folly/experimental/wangle/concurrent/test/ThreadPoolExecutorTest.cpp b/folly/experimental/wangle/concurrent/test/ThreadPoolExecutorTest.cpp index d36cca78..bacee2ba 100644 --- a/folly/experimental/wangle/concurrent/test/ThreadPoolExecutorTest.cpp +++ b/folly/experimental/wangle/concurrent/test/ThreadPoolExecutorTest.cpp @@ -61,10 +61,10 @@ TEST(ThreadPoolExecutorTest, IOResize) { template static void stop() { - TPE tpe(10); + TPE tpe(1); std::atomic completed(0); auto f = [&](){ - burnMs(1)(); + burnMs(10)(); completed++; }; for (int i = 0; i < 1000; i++) { @@ -203,7 +203,7 @@ static void expiration() { })); std::atomic expireCbCount(0); auto expireCb = [&] () { expireCbCount++; }; - tpe.add(burnMs(10), milliseconds(10), expireCb); + tpe.add(burnMs(10), seconds(60), expireCb); tpe.add(burnMs(10), milliseconds(10), expireCb); tpe.join(); EXPECT_EQ(2, statCbCount); -- 2.34.1