Reduce chance of name collision for resources.
I am not sure how to make this totally reliable without using long uuids but this should reduce
the chance of collision from one in thousands to one in millions, more than enough to make this not be the weakest link
of build failure. It can be improved in the future if necessary.
Change-Id: I0337db0e1bf7a028855a3d18b8eb9894e1a436bf
diff --git a/tempest/common/utils/data_utils.py b/tempest/common/utils/data_utils.py
index 82982b8..e75b54f 100644
--- a/tempest/common/utils/data_utils.py
+++ b/tempest/common/utils/data_utils.py
@@ -24,10 +24,10 @@
def rand_name(name='test'):
- return name + str(random.randint(1, 999999))
+ return name + str(random.randint(1, 0x7fffffff))
-def rand_int_id(start=0, end=999999):
+def rand_int_id(start=0, end=0x7fffffff):
return random.randint(start, end)