diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-03-24 17:24:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-24 12:24:58 -0400 |
commit | 30bcf6a2ea620aa989a7362e7f4a62fc11743bb4 (patch) | |
tree | a1e0721425a34c40142230fe392cac15170a6791 /cli/js/tests/test_util.ts | |
parent | b2478f3a217d5decbb638bf46e169ee58f17adad (diff) |
Revert "avoid using same port number for test (#4147)"
Ref #4467
This reverts commit 60cee4f045778777a16b6fffd6d5b9a1400d7246.
Diffstat (limited to 'cli/js/tests/test_util.ts')
-rw-r--r-- | cli/js/tests/test_util.ts | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/cli/js/tests/test_util.ts b/cli/js/tests/test_util.ts index 347a2204e..980d32bac 100644 --- a/cli/js/tests/test_util.ts +++ b/cli/js/tests/test_util.ts @@ -359,21 +359,3 @@ unitTest( }); } ); -function* portIterator(): IterableIterator<number> { - // use 49152 ~ 55000 for js/cli (rest are for std) - let i = 49152; - while (true) { - yield i; - i++; - if (i > 55000) { - i = 55000; - } - } -} -const it = portIterator(); -/** Obtain (maybe) safe port number for net tests */ -export function randomPort(): number { - const { value } = it.next(); - assert(value != null); - return value; -} |