fix more flakey tests
authorJames Sedgwick <jsedgwick@fb.com>
Fri, 26 Sep 2014 15:48:09 +0000 (08:48 -0700)
committerAnton Likhtarov <alikhtarov@fb.com>
Fri, 26 Sep 2014 22:26:37 +0000 (15:26 -0700)
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

folly/experimental/wangle/concurrent/test/ThreadPoolExecutorTest.cpp

index d36cca789415cf0b0bb6052ddf342aaa5ec97506..bacee2ba4a87867021e157132148d28fb061b18e 100644 (file)
@@ -61,10 +61,10 @@ TEST(ThreadPoolExecutorTest, IOResize) {
 
 template <class TPE>
 static void stop() {
-  TPE tpe(10);
+  TPE tpe(1);
   std::atomic<int> 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<int> 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);