From 800ce94e5cdaa8dba7cf69b4c560a66a51ae0ec8 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 8 Dec 2017 18:33:36 -0800 Subject: tools,test: throw if common.PORT used in parallel tests common.PORT should not be used in parallelized tests. (There can be a port collision if another tests requests an arbitrary open port from the operating system and ends up getting common.PORT before a test that uses common.PORT uses the port.) In such a situation, throw an error. PR-URL: https://github.com/nodejs/node/pull/17559 Reviewed-By: Luigi Pinca Reviewed-By: Gibson Fahnestock --- tools/test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tools/test.py') diff --git a/tools/test.py b/tools/test.py index ccc25f2a88..230774b256 100755 --- a/tools/test.py +++ b/tools/test.py @@ -532,7 +532,8 @@ class TestCase(object): try: result = self.RunCommand(self.GetCommand(), { - "TEST_THREAD_ID": "%d" % self.thread_id + "TEST_THREAD_ID": "%d" % self.thread_id, + "TEST_PARALLEL" : "%d" % self.parallel }) finally: # Tests can leave the tty in non-blocking mode. If the test runner -- cgit v1.2.1