| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 39e2fb6 commit 03d2514
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -40,7 +40,16 @@ const noop = () => {}; | |||
| 40 | 40 | // gets tools to ignore it by default or by simple rules, especially eslint. | |
| 41 | 41 | let tmpDirName = '.tmp'; | |
| 42 | 42 | ||
| 43 | - exports.PORT = +process.env.NODE_COMMON_PORT || 12346; | ||
| 43 | + Object.defineProperty(exports, 'PORT', { | ||
| 44 | + get: () => { | ||
| 45 | + if (+process.env.TEST_PARALLEL) { | ||
| 46 | + throw new Error('common.PORT cannot be used in a parallelized test'); | ||
| 47 | + } | ||
| 48 | + return +process.env.NODE_COMMON_PORT || 12346; | ||
| 49 | + }, | ||
| 50 | + enumerable: true | ||
| 51 | + }); | ||
| 52 | + | ||
| 44 | 53 | ||
| 45 | 54 | exports.isWindows = process.platform === 'win32'; | |
| 46 | 55 | exports.isWOW64 = exports.isWindows && | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -532,7 +532,8 @@ def Run(self): | |||
| 532 | 532 | ||
| 533 | 533 | try: | |
| 534 | 534 | result = self.RunCommand(self.GetCommand(), { | |
| 535 | - "TEST_THREAD_ID": "%d" % self.thread_id | ||
| 535 | + "TEST_THREAD_ID": "%d" % self.thread_id, | ||
| 536 | + "TEST_PARALLEL" : "%d" % self.parallel | ||
| 536 | 537 | }) | |
| 537 | 538 | finally: | |
| 538 | 539 | # Tests can leave the tty in non-blocking mode. If the test runner | |
| Back | FazBrowse Home | New Git URL |
0 commit comments