Commit 8c50c07d authored by Jim Fulton's avatar Jim Fulton

Made the interaction of ClientStorage.verify_cache and connection

tests more precise to aid test debugging.
parent fc597ef5
...@@ -1316,7 +1316,7 @@ class ClientStorage(object): ...@@ -1316,7 +1316,7 @@ class ClientStorage(object):
if ltid and ltid != utils.z64: if ltid and ltid != utils.z64:
self._cache.setLastTid(ltid) self._cache.setLastTid(ltid)
self.finish_verification() self.finish_verification()
return "full verification" return "empty cache"
last_inval_tid = self._cache.getLastTid() last_inval_tid = self._cache.getLastTid()
if last_inval_tid is not None: if last_inval_tid is not None:
......
...@@ -593,14 +593,14 @@ class InvqTests(CommonSetupTearDown): ...@@ -593,14 +593,14 @@ class InvqTests(CommonSetupTearDown):
def checkQuickVerificationWith2Clients(self): def checkQuickVerificationWith2Clients(self):
perstorage = self.openClientStorage(cache="test") perstorage = self.openClientStorage(cache="test")
self.assertEqual(perstorage.verify_result, "full verification") self.assertEqual(perstorage.verify_result, "empty cache")
self._storage = self.openClientStorage() self._storage = self.openClientStorage()
oid = self._storage.new_oid() oid = self._storage.new_oid()
oid2 = self._storage.new_oid() oid2 = self._storage.new_oid()
# When we create a new storage, it should always do a full # When we create a new storage, it should always do a full
# verification # verification
self.assertEqual(self._storage.verify_result, "full verification") self.assertEqual(self._storage.verify_result, "empty cache")
# do two storages of the object to make sure an invalidation # do two storages of the object to make sure an invalidation
# message is generated # message is generated
revid = self._dostore(oid) revid = self._dostore(oid)
...@@ -628,13 +628,13 @@ class InvqTests(CommonSetupTearDown): ...@@ -628,13 +628,13 @@ class InvqTests(CommonSetupTearDown):
def checkVerificationWith2ClientsInvqOverflow(self): def checkVerificationWith2ClientsInvqOverflow(self):
perstorage = self.openClientStorage(cache="test") perstorage = self.openClientStorage(cache="test")
self.assertEqual(perstorage.verify_result, "full verification") self.assertEqual(perstorage.verify_result, "empty cache")
self._storage = self.openClientStorage() self._storage = self.openClientStorage()
oid = self._storage.new_oid() oid = self._storage.new_oid()
# When we create a new storage, it should always do a full # When we create a new storage, it should always do a full
# verification # verification
self.assertEqual(self._storage.verify_result, "full verification") self.assertEqual(self._storage.verify_result, "empty cache")
# do two storages of the object to make sure an invalidation # do two storages of the object to make sure an invalidation
# message is generated # message is generated
revid = self._dostore(oid) revid = self._dostore(oid)
...@@ -836,7 +836,7 @@ class ReconnectionTests(CommonSetupTearDown): ...@@ -836,7 +836,7 @@ class ReconnectionTests(CommonSetupTearDown):
self._storage = self.openClientStorage() self._storage = self.openClientStorage()
# When we create a new storage, it should always do a full # When we create a new storage, it should always do a full
# verification # verification
self.assertEqual(self._storage.verify_result, "full verification") self.assertEqual(self._storage.verify_result, "empty cache")
self._dostore() self._dostore()
self.shutdownServer() self.shutdownServer()
self.pollDown() self.pollDown()
...@@ -849,13 +849,13 @@ class ReconnectionTests(CommonSetupTearDown): ...@@ -849,13 +849,13 @@ class ReconnectionTests(CommonSetupTearDown):
def checkNoVerificationOnServerRestartWith2Clients(self): def checkNoVerificationOnServerRestartWith2Clients(self):
perstorage = self.openClientStorage(cache="test") perstorage = self.openClientStorage(cache="test")
self.assertEqual(perstorage.verify_result, "full verification") self.assertEqual(perstorage.verify_result, "empty cache")
self._storage = self.openClientStorage() self._storage = self.openClientStorage()
oid = self._storage.new_oid() oid = self._storage.new_oid()
# When we create a new storage, it should always do a full # When we create a new storage, it should always do a full
# verification # verification
self.assertEqual(self._storage.verify_result, "full verification") self.assertEqual(self._storage.verify_result, "empty cache")
# do two storages of the object to make sure an invalidation # do two storages of the object to make sure an invalidation
# message is generated # message is generated
revid = self._dostore(oid) revid = self._dostore(oid)
......
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