summaryrefslogtreecommitdiff
path: root/std/examples/tests/curl_test.ts
diff options
context:
space:
mode:
authoruki00a <uki00a@gmail.com>2020-03-23 03:41:42 +0900
committerGitHub <noreply@github.com>2020-03-22 14:41:42 -0400
commit07ea145ec4d1defe4481035432bb63234560ba8d (patch)
treeb9c1c34425f9d035a2d7c60706c137619c8a33a4 /std/examples/tests/curl_test.ts
parent12ff78ed4cdf05a27348079c5af259ab2492423e (diff)
re-enable a test (#4461)
Diffstat (limited to 'std/examples/tests/curl_test.ts')
-rw-r--r--std/examples/tests/curl_test.ts8
1 files changed, 3 insertions, 5 deletions
diff --git a/std/examples/tests/curl_test.ts b/std/examples/tests/curl_test.ts
index a36da83ba..3e3d4f78a 100644
--- a/std/examples/tests/curl_test.ts
+++ b/std/examples/tests/curl_test.ts
@@ -6,12 +6,9 @@ import { randomPort } from "../../http/test_util.ts";
const port = randomPort();
Deno.test({
name: "[examples/curl] send a request to a specified url",
- // FIXME(bartlomieju): this test is leaking both resources and ops,
- // and causes interference with other tests
- ignore: true,
fn: async () => {
const server = serve({ port });
- (async (): Promise<void> => {
+ const serverPromise = (async (): Promise<void> => {
for await (const req of server) {
req.respond({ body: "Hello world" });
}
@@ -36,8 +33,9 @@ Deno.test({
assertStrictEq(actual, expected);
} finally {
- process.close();
server.close();
+ process.close();
+ await serverPromise;
}
}
});