Index: runtime/vm/thread_pool_test.cc |
=================================================================== |
--- runtime/vm/thread_pool_test.cc (revision 45833) |
+++ runtime/vm/thread_pool_test.cc (working copy) |
@@ -12,18 +12,6 @@ |
DECLARE_FLAG(int, worker_timeout_millis); |
-class ThreadPoolTestPeer { |
- public: |
- // When the pool has an exit monitor, workers notify a monitor just |
- // before they exit. This is only used in tests to make sure that |
- // Shutdown works. |
- static void SetExitMonitor(Monitor* exit_monitor, int* exit_count) { |
- ThreadPool::exit_monitor_ = exit_monitor; |
- ThreadPool::exit_count_ = exit_count; |
- } |
-}; |
- |
- |
UNIT_TEST_CASE(ThreadPool_Create) { |
ThreadPool thread_pool; |
} |
@@ -101,30 +89,6 @@ |
}; |
-UNIT_TEST_CASE(ThreadPool_WorkerShutdown) { |
- Monitor exit_sync; |
- int exit_count = 0; |
- MonitorLocker ml(&exit_sync); |
- |
- // Set up the ThreadPool so that workers notify before they exit. |
- ThreadPool* thread_pool = new ThreadPool(); |
- ThreadPoolTestPeer::SetExitMonitor(&exit_sync, &exit_count); |
- |
- // Run a single task. |
- thread_pool->Run(new SleepTask(2)); |
- |
- // Kill the thread pool. |
- delete thread_pool; |
- thread_pool = NULL; |
- |
- // Wait for the workers to terminate. |
- while (exit_count == 0) { |
- ml.Wait(); |
- } |
- EXPECT_EQ(1, exit_count); |
-} |
- |
- |
UNIT_TEST_CASE(ThreadPool_WorkerTimeout) { |
// Adjust the worker timeout so that we timeout quickly. |
int saved_timeout = FLAG_worker_timeout_millis; |