Commit e1e996a8 authored by Toby Dickenson's avatar Toby Dickenson

add comment about intermittant failures in checkSize and checkDetail

parent 07bb99c6
...@@ -160,6 +160,12 @@ class LRUCacheTests(CacheTestBase): ...@@ -160,6 +160,12 @@ class LRUCacheTests(CacheTestBase):
# the root, depending on precise order of access. We do # the root, depending on precise order of access. We do
# not bother to check this # not bother to check this
# checkSize and checkDetail are bad tests. They rely on
# several different types of non-deterministic behavior
# in noodle_new_connection. Both tests pass most of the
# time, but do fail intermittantly.
# Toby Dickenson promised to improve this
def checkSize(self): def checkSize(self):
self.assertEqual(self.db.cacheSize(), 0) self.assertEqual(self.db.cacheSize(), 0)
self.assertEqual(self.db.cacheDetailSize(), []) self.assertEqual(self.db.cacheDetailSize(), [])
...@@ -180,6 +186,7 @@ class LRUCacheTests(CacheTestBase): ...@@ -180,6 +186,7 @@ class LRUCacheTests(CacheTestBase):
# the connection holds a reference to it # the connection holds a reference to it
self.assertEquals(d['size'], CACHE_SIZE + 1) self.assertEquals(d['size'], CACHE_SIZE + 1)
# checkDetail is a bad test. See checkSize for more details
def checkDetail(self): def checkDetail(self):
CACHE_SIZE = 10 CACHE_SIZE = 10
self.db.setCacheSize(CACHE_SIZE) self.db.setCacheSize(CACHE_SIZE)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment