From f0893ffbb2b4cd3ee3b4048c20612ae66f24bf39 Mon Sep 17 00:00:00 2001 From: vamahaja Date: Wed, 29 Apr 2020 13:07:08 +0530 Subject: [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 --- tests/functional/gluster_stability/test_gluster_block_stability.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') 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], -- cgit