Follow up delayed reap probe test
This is a follow up patch for https://review.openstack.org/#/c/321041 This patch includes following items: - Move test_sync to below _verify_account_reaped to be the actual tests as a bunch - Change the test name fron "test_sync" to "test_reap" to clarify the purpose - Fix a typo from "Object" to "Container" for an error message Change-Id: I51bc01113056e2eb99f731d38e9f1c7a6c5c96be
This commit is contained in:
parent
44ba3c310a
commit
b7b77c7aa3
@ -57,12 +57,6 @@ class TestAccountReaper(ReplProbeTest):
|
||||
for node in nodes:
|
||||
direct_delete_account(node, part, self.account)
|
||||
|
||||
def test_sync(self):
|
||||
# run the reaper
|
||||
Manager(['account-reaper']).once()
|
||||
|
||||
self._verify_account_reaped()
|
||||
|
||||
def _verify_account_reaped(self):
|
||||
for policy, container, obj in self.all_objects:
|
||||
# verify that any container deletes were at same timestamp
|
||||
@ -152,6 +146,12 @@ class TestAccountReaper(ReplProbeTest):
|
||||
(self.account, container, obj, node, policy))
|
||||
self.assertEqual(1, len(delete_times))
|
||||
|
||||
def test_reap(self):
|
||||
# run the reaper
|
||||
Manager(['account-reaper']).once()
|
||||
|
||||
self._verify_account_reaped()
|
||||
|
||||
def test_delayed_reap(self):
|
||||
# define reapers which are supposed to operate 3 seconds later
|
||||
account_reapers = []
|
||||
@ -174,7 +174,8 @@ class TestAccountReaper(ReplProbeTest):
|
||||
direct_head_container(cnode, cpart, self.account,
|
||||
container)
|
||||
except ClientException:
|
||||
self.fail("Nothing should be reaped. Object should exist")
|
||||
self.fail(
|
||||
"Nothing should be reaped. Container should exist")
|
||||
|
||||
part, nodes = policy.object_ring.get_nodes(self.account,
|
||||
container, obj)
|
||||
|
Loading…
x
Reference in New Issue
Block a user