Commit 515c7a4e authored by Jochen Eisinger's avatar Jochen Eisinger Committed by Commit Bot

Relax conditions in compiler dispatcher test

Just ensure that all background and foreground tasks finished, then we
should be in a defined state

BUG=v8:6069
R=rmcilroy@chromium.org

Change-Id: Ie5bd11c61402dccb2c65cb8fe57fd1c0f550e9a7
Reviewed-on: https://chromium-review.googlesource.com/456418Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43926}
parent a93e5221
......@@ -722,10 +722,11 @@ TEST_F(CompilerDispatcherTest, FinishNowDuringAbortAll) {
// Force the compilation to finish, even while aborting.
ASSERT_TRUE(dispatcher.FinishNow(shared));
ASSERT_TRUE(dispatcher.jobs_.empty());
// Busy wait for the background task to finish.
for (;;) {
base::LockGuard<base::Mutex> lock(&dispatcher.mutex_);
if (dispatcher.num_background_tasks_ == 0) {
ASSERT_FALSE(dispatcher.abort_);
break;
}
}
......@@ -733,6 +734,13 @@ TEST_F(CompilerDispatcherTest, FinishNowDuringAbortAll) {
ASSERT_TRUE(platform.ForegroundTasksPending());
ASSERT_TRUE(platform.IdleTaskPending());
ASSERT_FALSE(platform.BackgroundTasksPending());
platform.RunForegroundTasks();
{
base::LockGuard<base::Mutex> lock(&dispatcher.mutex_);
ASSERT_FALSE(dispatcher.abort_);
}
platform.ClearForegroundTasks();
platform.ClearIdleTask();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment