File: add-delay-in-subnet-teardown.patch

package info (click to toggle)
tempest 1%3A45.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,876 kB
  • sloc: python: 86,749; sh: 174; makefile: 59
file content (27 lines) | stat: -rw-r--r-- 891 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Description: Add delay in subnet teardown
 This is a hack, and should be fixed in a better way...
Author: Thomas Goirand <zigo@debian.org>
Forwarded: no
Last-Update: 2022-01-10

--- tempest-29.0.0.orig/tempest/lib/services/network/subnets_client.py
+++ tempest-29.0.0/tempest/lib/services/network/subnets_client.py
@@ -10,6 +10,8 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+import time
+
 from tempest.lib.services.network import base
 
 
@@ -48,6 +50,9 @@ class SubnetsClient(base.BaseNetworkClie
         return self.show_resource(uri, **fields)
 
     def delete_subnet(self, subnet_id):
+        # This avoids failures when it takes time to teardown some ports
+        # and deleting a subnet happens too early.
+        time.sleep(10)
         uri = '/subnets/%s' % subnet_id
         return self.delete_resource(uri)