Changeset 59e80b2 in trunk
- Timestamp:
- 2010-10-24T19:34:09Z (14 years ago)
- Branches:
- master
- Children:
- 5528af0
- Parents:
- daf2b83
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/allmydata/test/test_mutable.py ¶
rdaf2b83 r59e80b2 294 294 d.addCallback(_created) 295 295 return d 296 297 def test_response_cache_memory_leak(self): 298 d = self.nodemaker.create_mutable_file("contents") 299 def _created(n): 300 d = n.download_best_version() 301 d.addCallback(lambda res: self.failUnlessEqual(res, "contents")) 302 d.addCallback(lambda ign: self.failUnless(isinstance(n._cache, ResponseCache))) 303 304 def _check_cache_size(expected): 305 # The total size of cache entries should not increase on the second download. 306 d2 = n.download_best_version() 307 d2.addCallback(lambda ign: self.failUnlessEqual(len(repr(n._cache.cache)), expected)) 308 return d2 309 d.addCallback(lambda ign: _check_cache_size(len(repr(n._cache.cache)))) 310 return d 311 d.addCallback(_created) 312 return d 313 test_response_cache_memory_leak.todo = "This isn't fixed (see #1045)." 296 314 297 315 def test_create_with_initial_contents_function(self):
Note: See TracChangeset
for help on using the changeset viewer.