summaryrefslogtreecommitdiff
path: root/std/http/racing_server_test.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/racing_server_test.ts
parentb2478f3a217d5decbb638bf46e169ee58f17adad (diff)
Revert "avoid using same port number for test (#4147)"
Ref #4467 This reverts commit 60cee4f045778777a16b6fffd6d5b9a1400d7246.
Diffstat (limited to 'std/http/racing_server_test.ts')
-rw-r--r--std/http/racing_server_test.ts12
1 files changed, 2 insertions, 10 deletions
diff --git a/std/http/racing_server_test.ts b/std/http/racing_server_test.ts
index 76b0e872d..865777599 100644
--- a/std/http/racing_server_test.ts
+++ b/std/http/racing_server_test.ts
@@ -1,20 +1,12 @@
import { assert, assertEquals } from "../testing/asserts.ts";
import { BufReader, BufWriter } from "../io/bufio.ts";
import { TextProtoReader } from "../textproto/mod.ts";
-import { randomPort } from "./test_util.ts";
-const port = randomPort();
const { connect, run, test } = Deno;
let server: Deno.Process;
async function startServer(): Promise<void> {
server = run({
- cmd: [
- Deno.execPath(),
- "run",
- "-A",
- "http/racing_server.ts",
- "127.0.0.1:" + port
- ],
+ cmd: [Deno.execPath(), "run", "-A", "http/racing_server.ts"],
stdout: "piped"
});
// Once racing server is ready it will write to its stdout.
@@ -69,7 +61,7 @@ Step7
test(async function serverPipelineRace(): Promise<void> {
await startServer();
- const conn = await connect({ port });
+ const conn = await connect({ port: 4501 });
const r = new TextProtoReader(new BufReader(conn));
const w = new BufWriter(conn);
await w.write(new TextEncoder().encode(input));