Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1721)

Unified Diff: chrome/browser/extensions/activity_log/counting_policy_unittest.cc

Issue 23991002: Fix flaky CountingPolicyTest.CapReturns test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compile fix Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/activity_log/counting_policy_unittest.cc
diff --git a/chrome/browser/extensions/activity_log/counting_policy_unittest.cc b/chrome/browser/extensions/activity_log/counting_policy_unittest.cc
index d71feaf687ab09243ecfe593b58af5f6abbb8026..2dee531f515fd757e180eaf186547217a391f10e 100644
--- a/chrome/browser/extensions/activity_log/counting_policy_unittest.cc
+++ b/chrome/browser/extensions/activity_log/counting_policy_unittest.cc
@@ -87,12 +87,12 @@ class CountingPolicyTest : public testing::Test {
checker,
base::MessageLoop::current()->QuitClosure()));
- // Set up a timeout that will trigger after 5 seconds; if we haven't
+ // Set up a timeout that will trigger after 8 seconds; if we haven't
// received any results by then assume that the test is broken.
base::CancelableClosure timeout(
base::Bind(&CountingPolicyTest::TimeoutCallback));
base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE, timeout.callback(), base::TimeDelta::FromSeconds(5));
+ FROM_HERE, timeout.callback(), base::TimeDelta::FromSeconds(8));
// Wait for results; either the checker or the timeout callbacks should
// cause the main loop to exit.
@@ -124,12 +124,12 @@ class CountingPolicyTest : public testing::Test {
checker,
base::MessageLoop::current()->QuitClosure()));
- // Set up a timeout that will trigger after 5 seconds; if we haven't
+ // Set up a timeout that will trigger after 8 seconds; if we haven't
// received any results by then assume that the test is broken.
base::CancelableClosure timeout(
base::Bind(&CountingPolicyTest::TimeoutCallback));
base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE, timeout.callback(), base::TimeDelta::FromSeconds(5));
+ FROM_HERE, timeout.callback(), base::TimeDelta::FromSeconds(8));
// Wait for results; either the checker or the timeout callbacks should
// cause the main loop to exit.
@@ -798,7 +798,9 @@ TEST_F(CountingPolicyTest, CapReturns) {
base::StringPrintf("apicall_%d", i));
policy->ProcessAction(action);
}
+
policy->Flush();
+ WaitOnThread(BrowserThread::DB);
CheckReadFilteredData(
policy,
« no previous file with comments | « no previous file | chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698