[Tempest] Fix concurrency in "test_show_share_server" test

In test "test_show_share_server" that is located in
"manila_tempest_tests/tests/api/admin/test_share_servers.py" module
we can (rarely) face concurrency issue, when first share_server from
list of share servers gets deleted between "taking list of servers" call and
"getting its first element". It can be any share server of any concurrent test.
So, fix it by usage of share server that is being hold by its class and will
always exist while this test runs.

Change-Id: I7675a201bcd1eb33f1214ba9837f28a5295f54fc
Closes-Bug: #1608600
(cherry picked from commit 0fa609e2f2)
This commit is contained in:
Valeriy Ponomaryov 2016-08-01 19:59:24 +03:00 committed by Goutham Pacha Ravi
parent d74bd053dd
commit b8c7fad599
1 changed files with 2 additions and 2 deletions

View File

@ -165,8 +165,8 @@ class ShareServersAdminTest(base.BaseSharesAdminTest):
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
def test_show_share_server(self):
servers = self.shares_client.list_share_servers()
server = self.shares_client.show_share_server(servers[0]["id"])
share = self.shares_client.get_share(self.share["id"])
server = self.shares_client.show_share_server(share["share_server_id"])
keys = [
"id",
"host",