Change in vdsm[master]: tcTests: base pseudo-random bridge names on PID, too.

danken at redhat.com danken at redhat.com
Mon May 18 19:16:33 UTC 2015


Dan Kenigsberg has uploaded a new change for review.

Change subject: tcTests: base pseudo-random bridge names on PID, too.
......................................................................

tcTests: base pseudo-random bridge names on PID, too.

It seems that the Jenkins-driven mock test provides a too-reproducible
environment, where two concurrent tests produce identical pseudo-random
bridge names.

This patch attempts to hack arround this by including the different
process id of the concurrently-running test into the random hash.

Change-Id: Ie415d8d23d0591d78a13152da13ca3eb45cad0cd
Signed-off-by: Dan Kenigsberg <danken at redhat.com>
---
M tests/tcTests.py
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/79/41079/1

diff --git a/tests/tcTests.py b/tests/tcTests.py
index 7bea289..b69b924 100644
--- a/tests/tcTests.py
+++ b/tests/tcTests.py
@@ -148,6 +148,9 @@
 
 def _checkDependencies():
 
+    # hack to avoid name collision in concurrently-running mock-based tests
+    random.jumpahead(os.getpid())
+
     dev = _Bridge()
     try:
         dev.addDevice()


-- 
To view, visit https://gerrit.ovirt.org/41079
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie415d8d23d0591d78a13152da13ca3eb45cad0cd
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken at redhat.com>


More information about the vdsm-patches mailing list