From 0729666143f80dab4595d9d2d34789d9e3d08479 Mon Sep 17 00:00:00 2001 From: Sri Vignesh Date: Wed, 17 Jun 2020 12:23:12 +0530 Subject: [TestFix] Add steps to handle bv pending operation Fix consists of: 1. after 2 bv is created using async it returns 0 pending operation and takes some time to show the third pending operation. so added a additional check for bv equal to vol_count 2. changed correct value for assertion fail statement Change-Id: I2edf22c466114c108d997832f2b9a75e165330af Signed-off-by: Sri Vignesh --- tests/functional/heketi/test_heketi_create_volume.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tests/functional') diff --git a/tests/functional/heketi/test_heketi_create_volume.py b/tests/functional/heketi/test_heketi_create_volume.py index afb36c0d..2ab95b5e 100644 --- a/tests/functional/heketi/test_heketi_create_volume.py +++ b/tests/functional/heketi/test_heketi_create_volume.py @@ -636,13 +636,15 @@ class TestHeketiVolume(BaseClass): h_node, h_url, h_volume_size, json=True)) # Check for pending operations - for w in waiter.Waiter(timeout=30, interval=5): + for w in waiter.Waiter(timeout=120, interval=10): h_db_chk_during = heketi_db_check(h_node, h_url) h_db_check_bricks_during = h_db_chk_during["bricks"] h_db_check_vol_during = h_db_chk_during["{}volumes".format( vol_type)] - + if vol_type == 'block': + if h_db_check_vol_during["total"] != vol_count: + continue if h_db_check_vol_during["pending"]: break @@ -731,7 +733,7 @@ class TestHeketiVolume(BaseClass): self.assertEqual( h_db_check_after["volumes"]["total"], h_db_check_before["volumes"]["total"] + len(total_bhvs), - "Total volume before {} and after {} creation not" + "Total volume after {} and before {} creation not" " matched".format( h_db_check_after["volumes"]["total"], h_db_check_before["volumes"]["total"])) -- cgit