From 04c776cbebf0d9f239be081d0d2b7a25c50e2438 Mon Sep 17 00:00:00 2001 From: Dave Page Date: Fri, 15 Mar 2019 12:03:42 +0000 Subject: [PATCH] Randomise the database name used for encoding tests to avoid collisions when multiple tests are running against the same server. --- web/pgadmin/tools/sqleditor/tests/test_encoding_charset.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/pgadmin/tools/sqleditor/tests/test_encoding_charset.py b/web/pgadmin/tools/sqleditor/tests/test_encoding_charset.py index e7593be5f..a55416bdc 100644 --- a/web/pgadmin/tools/sqleditor/tests/test_encoding_charset.py +++ b/web/pgadmin/tools/sqleditor/tests/test_encoding_charset.py @@ -15,6 +15,7 @@ from regression import parent_node_dict from regression.python_test_utils import test_utils import json from pgadmin.utils import server_utils, IS_PY2 +import random class TestEncodingCharset(BaseTestGenerator): @@ -223,7 +224,8 @@ class TestEncodingCharset(BaseTestGenerator): ] def setUp(self): - self.encode_db_name = 'encoding_' + self.db_encoding + self.encode_db_name = 'encoding_' + self.db_encoding + \ + str(random.randint(10000, 65535)) self.encode_sid = self.server_information['server_id'] server_con = server_utils.connect_server(self, self.encode_sid)