File test_container_sync.patch of Package openstack-tempest

From e218b9ddba4f48350eb4dfa297792519da2f5873 Mon Sep 17 00:00:00 2001
From: Abel Navarro <abel.navarro@gmail.com>
Date: Fri, 10 Jun 2016 16:20:47 +0200
Subject: [PATCH] Fix for middleware container sync test

In the resource allocation from ContainerSyncTest two clients are
created and they are never released. This causes the second test (the
middleware one, the first one is skipped) to have four clients. Clients
are stored in a dictionary and retrieved by position, not key. In the
lucky case proper clients will be chosen but many times will fail.
Clearing the clients fixes the problem.

Change-Id: I1266bf0234fa26571300f5976d99a9417dfe8089
Closes-Bug: 1433132
---
 tempest/api/object_storage/test_container_sync.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tempest/api/object_storage/test_container_sync.py b/tempest/api/object_storage/test_container_sync.py
index 2a5cec6..0eb7f26 100644
--- a/tempest/api/object_storage/test_container_sync.py
+++ b/tempest/api/object_storage/test_container_sync.py
@@ -81,6 +81,7 @@ class ContainerSyncTest(base.BaseObjectTest):
     def resource_cleanup(cls):
         for client in cls.clients.values():
             cls.delete_containers(cls.containers, client[0], client[1])
+        cls.clients = {}
         super(ContainerSyncTest, cls).resource_cleanup()
 
     def _test_container_synchronization(self, make_headers):
-- 
1.9.1

openSUSE Build Service is sponsored by