Use config_number method instead of node_id + 1
Change-Id: I596a2ac947f7e5f9c0cb3286779ece5e40feefd0
This commit is contained in:
parent
8d6eb36779
commit
c23b6db264
@ -396,11 +396,11 @@ class TestContainerMergePolicyIndex(ReplProbeTest):
|
||||
(node, direct_client.direct_head_container(
|
||||
node, container_part, self.account, self.container_name))
|
||||
for node in container_nodes]
|
||||
old_container_node_ids = [
|
||||
node['id'] for node, metadata in head_responses
|
||||
old_container_nodes = [
|
||||
node for node, metadata in head_responses
|
||||
if int(old_policy) ==
|
||||
int(metadata['X-Backend-Storage-Policy-Index'])]
|
||||
self.assertEqual(2, len(old_container_node_ids))
|
||||
self.assertEqual(2, len(old_container_nodes))
|
||||
|
||||
# hopefully memcache still has the new policy cached
|
||||
self.brain.put_object(headers={'x-object-meta-test': 'custom-meta'},
|
||||
@ -425,7 +425,8 @@ class TestContainerMergePolicyIndex(ReplProbeTest):
|
||||
# and get rows enqueued from old nodes
|
||||
for server_type in ('container-replicator', 'container-updater'):
|
||||
server = Manager([server_type])
|
||||
tuple(server.once(number=n + 1) for n in old_container_node_ids)
|
||||
for node in old_container_nodes:
|
||||
server.once(number=self.config_number(node))
|
||||
|
||||
# verify entry in the queue for the "misplaced" new_policy
|
||||
for container in int_client.iter_containers('.misplaced_objects'):
|
||||
|
Loading…
Reference in New Issue
Block a user