Merge "Fix test_delete_propagate probe test"

This commit is contained in:
Jenkins 2017-02-11 01:25:32 +00:00 committed by Gerrit Code Review
commit c8a2b77313

View File

@ -200,19 +200,23 @@ class TestReconstructorRevert(ECProbeTest):
# repair the first primary # repair the first primary
self.revive_drive(self.device_dir('object', failed_nodes[0])) self.revive_drive(self.device_dir('object', failed_nodes[0]))
# run the reconstructor on the *second* handoff node # run the reconstructor on the handoffs nodes, if there are no data
self.reconstructor.once(number=self.config_number(hnodes[1])) # frags to hint at the node index - each hnode syncs to all primaries
for hnode in hnodes:
self.reconstructor.once(number=self.config_number(hnode))
# make sure it's tombstone was pushed out # because not all primaries are online, the tombstones remain
try: for hnode in hnodes:
self.direct_get(hnodes[1], opart) try:
except direct_client.DirectClientException as err: self.direct_get(hnode, opart)
self.assertEqual(err.http_status, 404) except direct_client.DirectClientException as err:
self.assertNotIn('X-Backend-Timestamp', err.http_headers) self.assertEqual(err.http_status, 404)
else: self.assertEqual(err.http_headers['X-Backend-Timestamp'],
self.fail('Found obj data on %r' % hnodes[1]) delete_timestamp)
else:
self.fail('Found obj data on %r' % hnode)
# ... and it's on the first failed (now repaired) primary # ... but it's on the first failed (now repaired) primary
try: try:
self.direct_get(failed_nodes[0], opart) self.direct_get(failed_nodes[0], opart)
except direct_client.DirectClientException as err: except direct_client.DirectClientException as err:
@ -247,6 +251,28 @@ class TestReconstructorRevert(ECProbeTest):
else: else:
self.fail('Found obj data on %r' % failed_nodes[1]) self.fail('Found obj data on %r' % failed_nodes[1])
# ... but still on the second handoff node
try:
self.direct_get(hnodes[1], opart)
except direct_client.DirectClientException as err:
self.assertEqual(err.http_status, 404)
self.assertEqual(err.http_headers['X-Backend-Timestamp'],
delete_timestamp)
else:
self.fail('Found obj data on %r' % hnodes[1])
# ... until it's next sync
self.reconstructor.once(number=self.config_number(hnodes[1]))
# ... then it's tombstone is pushed off too!
try:
self.direct_get(hnodes[1], opart)
except direct_client.DirectClientException as err:
self.assertEqual(err.http_status, 404)
self.assertNotIn('X-Backend-Timestamp', err.http_headers)
else:
self.fail('Found obj data on %r' % hnodes[1])
# sanity make sure proxy get can't find it # sanity make sure proxy get can't find it
try: try:
self.proxy_get() self.proxy_get()