Fix racy DHSS=True share groups test

We recently addressed a bug in Manila where
share networks couldn't be deleted when they were
still associated with any share groups [1]. After this
fix, we had a couple of tests failing sporadically
because they weren't waiting for the deletion of
the share groups prior to attempting deletion
of the share network subnets.

Change-Id: I532ff3f0b2613340e0cb46c3b7e57a22cfa50c61
Related-Bug: #2004212
Closes-Bug: #2064673
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
diff --git a/manila_tempest_tests/tests/api/test_share_groups.py b/manila_tempest_tests/tests/api/test_share_groups.py
index ab6b9d1..dbc673c 100644
--- a/manila_tempest_tests/tests/api/test_share_groups.py
+++ b/manila_tempest_tests/tests/api/test_share_groups.py
@@ -401,6 +401,8 @@
         # Delete share group
         self.shares_v2_client.delete_share_group(
             share_group['id'], version=constants.MIN_SHARE_GROUP_MICROVERSION)
+        self.shares_v2_client.wait_for_resource_deletion(
+            share_group_id=share_group['id'])
 
         # Delete subnet
         self.shares_v2_client.delete_subnet(