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

Unified Diff: net/disk_cache/backend_unittest.cc

Issue 691803003: Do not DCHECK on SimpleCache deletion-while-closing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove bigger example test Created 6 years, 2 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
Index: net/disk_cache/backend_unittest.cc
diff --git a/net/disk_cache/backend_unittest.cc b/net/disk_cache/backend_unittest.cc
index bb313ed39d2075d060f0f88ebdeb370d71143d5b..9969e3e4985caca10aae046d48f93bb4d7718fe0 100644
--- a/net/disk_cache/backend_unittest.cc
+++ b/net/disk_cache/backend_unittest.cc
@@ -3481,3 +3481,13 @@ TEST_F(DiskCacheBackendTest, SimpleCacheEnumerationDestruction) {
cache_.reset();
// This test passes if we don't leak memory.
}
+
+// Tests that a SimpleCache doesn't crash when files are deleted very quickly
+// after closing.
+// NOTE: IF THIS TEST IS FLAKY THEN IT IS FAILING.
jkarlin 2014/10/30 19:19:24 Append the bug that this CL fixes to the test comm
jkarlin 2014/10/30 19:19:24 Does this flake at least say 20% of the time? It
gavinp 2014/10/31 13:55:54 I get a 100% failure rate on 100 iterations on my
gavinp 2014/10/31 13:55:54 Done.
+TEST_F(DiskCacheBackendTest, SimpleCacheDeleteQuickly) {
+ SetSimpleCacheMode();
+ InitCache();
+ cache_.reset();
+ EXPECT_TRUE(CleanupCacheDir());
+}
« no previous file with comments | « no previous file | net/disk_cache/simple/simple_index_file.cc » ('j') | net/disk_cache/simple/simple_index_file.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698