]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- use uuid fragments for provision names to enable multiple test suites
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 23 Jan 2016 19:58:42 +0000 (14:58 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 23 Jan 2016 19:58:42 +0000 (14:58 -0500)
per server

lib/sqlalchemy/testing/plugin/pytestplugin.py

index 30d7aa73ab34d994986378c066ae6aee99e7801a..5bb6b966d557c39b865e70d8faf35b46ce6df03f 100644 (file)
@@ -55,7 +55,7 @@ def pytest_sessionstart(session):
     plugin_base.post_begin()
 
 if has_xdist:
-    _follower_count = itertools.count(1)
+    import uuid
 
     def pytest_configure_node(node):
         # the master for each node fills slaveinput dictionary
@@ -63,7 +63,7 @@ if has_xdist:
 
         plugin_base.memoize_important_follower_config(node.slaveinput)
 
-        node.slaveinput["follower_ident"] = "test_%s" % next(_follower_count)
+        node.slaveinput["follower_ident"] = "test_%s" % uuid.uuid4().hex[0:12]
         from sqlalchemy.testing import provision
         provision.create_follower_db(node.slaveinput["follower_ident"])