Bug 1565769 - Give threads an additional 50 ms to finish up in ShutdownWithTimeout tests r=erahm

Gtest jobs on the osx1014 try hardware are taking longer than anticipated to finish up, and ThreadPool.ShutdownWithTimeout tests need to wait an extra 50ms to let all threads finish on time. On the long term, when the underlying issue is fixed thread timeouts will need to be readjusted back to 300ms.

Differential Revision: https://phabricator.services.mozilla.com/D38452

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Kristen Wright 2019-07-18 17:57:43 +00:00
Родитель 23c2b98a25
Коммит 5984a7cba7
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -134,8 +134,8 @@ TEST(ThreadPool, ShutdownWithTimeout)
pool->Dispatch(task, NS_DISPATCH_NORMAL);
}
// Wait for a max of 300 ms. All threads should be done by then.
pool->ShutdownWithTimeout(300);
// Wait for a max of 350 ms. All threads should be done by then.
pool->ShutdownWithTimeout(350);
EXPECT_EQ(allThreadsCount, 4);
Atomic<int> infiniteLoopCount(0);
@ -195,9 +195,9 @@ TEST(ThreadPool, ShutdownWithTimeoutThenSleep)
}),
NS_DISPATCH_NORMAL);
// Wait for a max of 300 ms. The thread should still be sleeping, and will
// Wait for a max of 350 ms. The thread should still be sleeping, and will
// be leaked.
pool->ShutdownWithTimeout(300);
pool->ShutdownWithTimeout(350);
// We can't be exact here; the thread we're running on might have gotten
// suspended and the sleeping thread, above, might have finished.
EXPECT_GE(count, 3);