| Index: base/profiler/stack_sampling_profiler_unittest.cc
|
| diff --git a/base/profiler/stack_sampling_profiler_unittest.cc b/base/profiler/stack_sampling_profiler_unittest.cc
|
| index 662a285377ec593ebf1dd99d2826dc354551a295..fa842a94318ff79d8f1614969f065329cc50c7bf 100644
|
| --- a/base/profiler/stack_sampling_profiler_unittest.cc
|
| +++ b/base/profiler/stack_sampling_profiler_unittest.cc
|
| @@ -882,11 +882,12 @@ TEST(StackSamplingProfilerTest, MAYBE_ConcurrentProfiling) {
|
| WithTargetThread([](PlatformThreadId target_thread_id) {
|
| SamplingParams params[2];
|
| params[0].initial_delay = TimeDelta::FromMilliseconds(10);
|
| - params[0].sampling_interval = TimeDelta::FromMilliseconds(0);
|
| - params[0].samples_per_burst = 1;
|
| + params[0].sampling_interval = TimeDelta::FromMilliseconds(1);
|
| + params[0].samples_per_burst = 10;
|
|
|
| - params[1].sampling_interval = TimeDelta::FromMilliseconds(0);
|
| - params[1].samples_per_burst = 1;
|
| + params[0].initial_delay = TimeDelta::FromMilliseconds(10);
|
| + params[1].sampling_interval = TimeDelta::FromMilliseconds(1);
|
| + params[1].samples_per_burst = 10;
|
|
|
| CallStackProfiles profiles[2];
|
| ScopedVector<WaitableEvent> sampling_completed;
|
| @@ -911,14 +912,9 @@ TEST(StackSamplingProfilerTest, MAYBE_ConcurrentProfiling) {
|
| EXPECT_EQ(1u, profiles[completed_profiler].size());
|
|
|
| size_t other_profiler = 1 - completed_profiler;
|
| - // Give the other profiler a chance to run and observe that it hasn't.
|
| - EXPECT_FALSE(sampling_completed[other_profiler]->TimedWait(
|
| - TimeDelta::FromMilliseconds(25)));
|
| -
|
| - // Start the other profiler again and it should run.
|
| - profiler[other_profiler]->Start();
|
| - sampling_completed[other_profiler]->Wait();
|
| - EXPECT_EQ(1u, profiles[other_profiler].size());
|
| + // Give the other profiler a chance to finish and verify it does no.
|
| + EXPECT_TRUE(sampling_completed[other_profiler]->TimedWait(
|
| + TimeDelta::FromMilliseconds(250)));
|
| });
|
| }
|
|
|
|
|