summaryrefslogtreecommitdiff
path: root/std/http/test_util.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-03-24 17:24:58 +0100
committerGitHub <noreply@github.com>2020-03-24 12:24:58 -0400
commit30bcf6a2ea620aa989a7362e7f4a62fc11743bb4 (patch)
treea1e0721425a34c40142230fe392cac15170a6791 /std/http/test_util.ts
parentb2478f3a217d5decbb638bf46e169ee58f17adad (diff)
Revert "avoid using same port number for test (#4147)"
Ref #4467 This reverts commit 60cee4f045778777a16b6fffd6d5b9a1400d7246.
Diffstat (limited to 'std/http/test_util.ts')
-rw-r--r--std/http/test_util.ts20
1 files changed, 0 insertions, 20 deletions
diff --git a/std/http/test_util.ts b/std/http/test_util.ts
deleted file mode 100644
index c86a339a7..000000000
--- a/std/http/test_util.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { assert } from "../testing/asserts.ts";
-
-function* portIterator(): IterableIterator<number> {
- // use 55001 ~ 65535 (rest (49152~55000) are for cli/js)
- let i = 55001;
- while (true) {
- yield i;
- i++;
- if (i > 65535) {
- i = 55001;
- }
- }
-}
-const it = portIterator();
-/** Obtain (maybe) safe port number for net tests */
-export function randomPort(): number {
- const { value } = it.next();
- assert(value != null);
- return value;
-}