network: test: Fix race condition when deleting connections

When deleting connections after editing, sometimes the connection is not found.
Wait until the connection settles down to avoid connection not found errors
during cleanup. Seems to work for now but still not the best way to handle this.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2020-06-28 17:20:25 -07:00 committed by James Valleroy
parent 60bbdfabf7
commit 86829a29c1
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -109,6 +109,7 @@ def _connection(network, settings):
uuid = network.add_connection(settings)
time.sleep(0.1)
yield uuid
time.sleep(0.1)
network.delete_connection(uuid)