diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-05 18:46:47 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-05 18:46:47 +0000 |
commit | ce292018a349f2fbe7c42adf41dfe4eea9cdfac5 (patch) | |
tree | 574f64cb51bf5c0675d61bd69e07cad3c7405839 /base | |
parent | e1d0303ebea1caddb079d71b63f39463d3944bad (diff) | |
download | chromium_src-ce292018a349f2fbe7c42adf41dfe4eea9cdfac5.zip chromium_src-ce292018a349f2fbe7c42adf41dfe4eea9cdfac5.tar.gz chromium_src-ce292018a349f2fbe7c42adf41dfe4eea9cdfac5.tar.bz2 |
Improve the run time of base_unittests by about 20s by reducing timeouts in
the following tests:
ObserverListThreadSafeTest.CrossThreadObserver
ObserverListThreadSafeTest.CrossThreadNotifications
ThreadCollisionTest.MTSynchedScopedBookCriticalSectionTest
ThreadCollisionTest.MTSynchedScopedRecursiveBookCriticalSectionTest
TEST=Covered by base_unittests.
BUG=none
Review URL: http://codereview.chromium.org/369001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31112 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/observer_list_unittest.cc | 2 | ||||
-rw-r--r-- | base/thread_collision_warner_unittest.cc | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/base/observer_list_unittest.cc b/base/observer_list_unittest.cc index 332de367f..ba4b5de 100644 --- a/base/observer_list_unittest.cc +++ b/base/observer_list_unittest.cc @@ -83,7 +83,7 @@ class AddInObserve : public Foo { class ObserverListThreadSafeTest : public testing::Test { }; -static const int kThreadRunTime = 10000; // ms to run the multi-threaded test. +static const int kThreadRunTime = 2000; // ms to run the multi-threaded test. // A thread for use in the ThreadSafeObserver test // which will add and remove itself from the notification diff --git a/base/thread_collision_warner_unittest.cc b/base/thread_collision_warner_unittest.cc index 238927a..b70cfbe 100644 --- a/base/thread_collision_warner_unittest.cc +++ b/base/thread_collision_warner_unittest.cc @@ -238,7 +238,7 @@ TEST(ThreadCollisionTest, MTScopedBookCriticalSectionTest) { } TEST(ThreadCollisionTest, MTSynchedScopedBookCriticalSectionTest) { - // Queue with a 5 seconds push execution time, hopefuly the two used threads + // Queue with a 2 seconds push execution time, hopefuly the two used threads // in the test will enter the push at same time. class NonThreadSafeQueue { public: @@ -248,7 +248,7 @@ TEST(ThreadCollisionTest, MTSynchedScopedBookCriticalSectionTest) { void push(int value) { DFAKE_SCOPED_LOCK(push_pop_); - PlatformThread::Sleep(5000); + PlatformThread::Sleep(2000); } int pop() { @@ -307,7 +307,7 @@ TEST(ThreadCollisionTest, MTSynchedScopedBookCriticalSectionTest) { } TEST(ThreadCollisionTest, MTSynchedScopedRecursiveBookCriticalSectionTest) { - // Queue with a 5 seconds push execution time, hopefuly the two used threads + // Queue with a 2 seconds push execution time, hopefuly the two used threads // in the test will enter the push at same time. class NonThreadSafeQueue { public: @@ -318,7 +318,7 @@ TEST(ThreadCollisionTest, MTSynchedScopedRecursiveBookCriticalSectionTest) { void push(int) { DFAKE_SCOPED_RECURSIVE_LOCK(push_pop_); bar(); - PlatformThread::Sleep(5000); + PlatformThread::Sleep(2000); } int pop() { |