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

Unified Diff: base/metrics/stats_table_unittest.cc

Issue 10538027: Add shared memory cleanup before/after all tests (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/stats_table_unittest.cc
===================================================================
--- base/metrics/stats_table_unittest.cc (revision 140808)
+++ base/metrics/stats_table_unittest.cc (working copy)
@@ -312,6 +312,7 @@
const std::string kTableName = "StatTable";
const int kMaxThreads = 20;
const int kMaxCounter = 5;
+ DeleteShmem(kTableName);
StatsTable table(kTableName, kMaxThreads, kMaxCounter);
StatsTable::set_current(&table);
@@ -337,15 +338,16 @@
bar.Stop();
EXPECT_GT(table.GetCounterValue("t:bar"), 0);
EXPECT_LE(kDuration.InMilliseconds() * 2, table.GetCounterValue("t:bar"));
+ DeleteShmem(kTableName);
}
// Test some basic StatsRate operations
-// Usually fails on all platforms when run alone. http://crbug.com/131024
-TEST_F(StatsTableTest, DISABLED_StatsRate) {
+TEST_F(StatsTableTest, StatsRate) {
// Create a stats table.
const std::string kTableName = "StatTable";
const int kMaxThreads = 20;
const int kMaxCounter = 5;
+ DeleteShmem(kTableName);
StatsTable table(kTableName, kMaxThreads, kMaxCounter);
StatsTable::set_current(&table);
@@ -371,6 +373,7 @@
baz.Stop();
EXPECT_EQ(2, table.GetCounterValue("c:baz"));
EXPECT_LE(kDuration.InMilliseconds() * 2, table.GetCounterValue("t:baz"));
+ DeleteShmem(kTableName);
}
// Test some basic StatsScope operations
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698