From 88941ebe464139bcf5e8f30ba498dd42817dfe08 Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Wed, 26 Apr 2023 15:37:11 -0700 Subject: [PATCH] tests: Fix config numbers in test_versioning_with_metadata_replication Closes-Bug: #2017021 Change-Id: If422f99a77245b35ab755857f9816c1e401a4e22 --- test/probe/test_object_versioning.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/probe/test_object_versioning.py b/test/probe/test_object_versioning.py index 60ecae9a14..09a209f543 100644 --- a/test/probe/test_object_versioning.py +++ b/test/probe/test_object_versioning.py @@ -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)