tests: Fix config numbers in test_versioning_with_metadata_replication

Closes-Bug: #2017021
Change-Id: If422f99a77245b35ab755857f9816c1e401a4e22
This commit is contained in:
Tim Burke 2023-04-26 15:37:11 -07:00
parent 9f75279739
commit 88941ebe46

View File

@ -273,18 +273,18 @@ class TestECObjectVersioning(ECProbeTest):
self.fail('unable to find object on handoffs')
# we want to repair the fault, but avoid doing the handoff revert
self.revive_drive(failed_primary_device_path)
handoff_config = (handoff['id'] + 1) % 4
failed_config = (failed_primary['id'] + 1) % 4
handoff_config = self.config_number(handoff)
failed_config = self.config_number(failed_primary)
partner_nodes = reconstructor._get_partners(
failed_primary['index'], self.nodes)
random.shuffle(partner_nodes)
for partner in partner_nodes:
fix_config = (partner['id'] + 1) % 4
fix_config = self.config_number(partner)
if fix_config not in (handoff_config, failed_config):
break
else:
self.fail('unable to find fix_config in %r excluding %r & %r' % (
[(d['device'], (d['id'] + 1) % 4) for d in partner_nodes],
[(d['device'], self.config_number(d)) for d in partner_nodes],
handoff_config, failed_config))
self.reconstructor.once(number=fix_config)