Avoid race condition between rule removal and share deletion in tearDown
The test_create_delete_access_rule_with_locks test occasionally fails because tearDown attempts to delete the share before the access rule, which involves locking, has been fully removed. This patch ensures that the access rule is properly removed before proceeding with share deletion, thus preventing the race condition. Change-Id: I61f889bc07d84c80116db2f2b15ce6dc5eb10c5d
This commit is contained in:
parent
c2470a21de
commit
0b592bceb9
@ -85,6 +85,8 @@ class ShareAccessRuleTest(base.BaseSharedFileSystemTest):
|
||||
lock_deletion=True,
|
||||
lock_visibility=True,
|
||||
)
|
||||
|
||||
self.user_cloud.share.delete_access_rule(
|
||||
access_rule['id'], self.SHARE_ID, unrestrict=True
|
||||
)
|
||||
self.user_cloud.shared_file_system.wait_for_delete(access_rule)
|
||||
|
Loading…
Reference in New Issue
Block a user