diff options
author | vamahaja <vamahaja@redhat.com> | 2020-04-29 13:07:08 +0530 |
---|---|---|
committer | vamahaja <vamahaja@redhat.com> | 2020-04-29 13:07:08 +0530 |
commit | f0893ffbb2b4cd3ee3b4048c20612ae66f24bf39 (patch) | |
tree | 8960e334400e5b79b54babfadc302befe55fd22a /tests/functional | |
parent | 28446571e6e36b73c76e546c2201f9859295e53b (diff) |
[TestFix] Fix 'RuntimeError' while updating dict in loop
Python3 returns iterator of list for function 'dict.items()',
which cuases 'RuntimeError' while trying to update dict inside
loop. Convert this iterator into list while looping over the
dict items.
Change-Id: Ia339bb89c4a8dbacae1c66ff41110975db73e9d7
Signed-off-by: vamahaja <vamahaja@redhat.com>
Diffstat (limited to 'tests/functional')
-rw-r--r-- | tests/functional/gluster_stability/test_gluster_block_stability.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/functional/gluster_stability/test_gluster_block_stability.py b/tests/functional/gluster_stability/test_gluster_block_stability.py index b4153cfd..e99c7294 100644 --- a/tests/functional/gluster_stability/test_gluster_block_stability.py +++ b/tests/functional/gluster_stability/test_gluster_block_stability.py @@ -934,7 +934,7 @@ class TestGlusterBlockStability(GlusterBlockBaseClass): for w in Waiter(900, 10): if not temp_pvc_node.items(): break - for pvc, new_node in temp_pvc_node.items(): + for pvc, new_node in list(temp_pvc_node.items()): if new_node != dc_and_pod_names[pvc][2]: iscsi = get_iscsi_session( dc_and_pod_names[pvc][2], |