summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/bench/http/deno_http_flash_ops.js37
-rw-r--r--cli/bench/http/deno_http_flash_ops_spawn.js18
-rw-r--r--cli/bench/http/deno_http_flash_post_bin.js16
-rw-r--r--cli/bench/http/deno_http_flash_post_bin.lua5
-rw-r--r--cli/bench/http/deno_http_flash_spawn.js18
-rw-r--r--cli/bench/http/deno_http_serve.js (renamed from cli/bench/http/deno_http_flash.js)0
-rw-r--r--cli/build.rs1
-rw-r--r--cli/tests/integration/run_tests.rs7
-rw-r--r--cli/tests/testdata/run/flash_shutdown/main.ts23
9 files changed, 0 insertions, 125 deletions
diff --git a/cli/bench/http/deno_http_flash_ops.js b/cli/bench/http/deno_http_flash_ops.js
deleted file mode 100644
index 7b024f9af..000000000
--- a/cli/bench/http/deno_http_flash_ops.js
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
-
-// deno-lint-ignore-file
-
-const {
- opAsync,
- ops: { op_flash_make_request, op_flash_serve },
- encode,
-} = Deno[Deno.internal].core;
-const addr = Deno.args[0] || "127.0.0.1:4500";
-const [hostname, port] = addr.split(":");
-const serverId = op_flash_serve({ hostname, port, reuseport: true });
-const serverPromise = opAsync("op_flash_drive_server", serverId);
-
-const fastOps = op_flash_make_request();
-function nextRequest() {
- return fastOps.nextRequest();
-}
-function respond(token, response) {
- return fastOps.respond(token, response, true);
-}
-
-const response = encode(
- "HTTP/1.1 200 OK\r\nContent-Length: 11\r\n\r\nHello World",
-);
-let offset = 0;
-while (true) {
- let token = nextRequest();
- if (token === 0) token = await opAsync("op_flash_next_async", serverId);
- for (let i = offset; i < offset + token; i++) {
- respond(
- i,
- response,
- );
- }
- offset += token;
-}
diff --git a/cli/bench/http/deno_http_flash_ops_spawn.js b/cli/bench/http/deno_http_flash_ops_spawn.js
deleted file mode 100644
index b9d11462f..000000000
--- a/cli/bench/http/deno_http_flash_ops_spawn.js
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
-
-if (Deno.build.os !== "linux") {
- throw new Error("SO_REUSEPORT is only supported on Linux");
-}
-
-const executable = Deno.execPath();
-const path = new URL("./deno_http_flash_ops.js", import.meta.url).pathname;
-// single flash instance runs on ~1.8 cores
-const cpus = navigator.hardwareConcurrency / 2;
-const processes = new Array(cpus);
-for (let i = 0; i < cpus; i++) {
- const proc = Deno.run({
- cmd: [executable, "run", "-A", "--unstable", path, Deno.args[0]],
- });
- processes.push(proc.status());
-}
-await Promise.all(processes);
diff --git a/cli/bench/http/deno_http_flash_post_bin.js b/cli/bench/http/deno_http_flash_post_bin.js
deleted file mode 100644
index b81553dcd..000000000
--- a/cli/bench/http/deno_http_flash_post_bin.js
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
-
-const addr = Deno.args[0] || "127.0.0.1:4500";
-const [hostname, port] = addr.split(":");
-const { serve } = Deno;
-
-async function handler(request) {
- try {
- const buffer = await request.arrayBuffer();
- return new Response(buffer.byteLength);
- } catch (e) {
- console.log(e);
- }
-}
-
-serve(handler, { hostname, port });
diff --git a/cli/bench/http/deno_http_flash_post_bin.lua b/cli/bench/http/deno_http_flash_post_bin.lua
deleted file mode 100644
index c8f5d3e3f..000000000
--- a/cli/bench/http/deno_http_flash_post_bin.lua
+++ /dev/null
@@ -1,5 +0,0 @@
-wrk.method = "POST"
-wrk.headers["Content-Type"] = "application/octet-stream"
-
-file = io.open("./cli/bench/testdata/128k.bin", "rb")
-wrk.body = file:read("*a") \ No newline at end of file
diff --git a/cli/bench/http/deno_http_flash_spawn.js b/cli/bench/http/deno_http_flash_spawn.js
deleted file mode 100644
index e47acffc5..000000000
--- a/cli/bench/http/deno_http_flash_spawn.js
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
-
-if (Deno.build.os !== "linux") {
- throw new Error("SO_REUSEPORT is only supported on Linux");
-}
-
-const executable = Deno.execPath();
-const path = new URL("./deno_http_flash.js", import.meta.url).pathname;
-// single flash instance runs on ~1.8 cores
-const cpus = navigator.hardwareConcurrency / 2;
-const processes = new Array(cpus);
-for (let i = 0; i < cpus; i++) {
- const proc = Deno.run({
- cmd: [executable, "run", "-A", "--unstable", path, Deno.args[0]],
- });
- processes.push(proc.status());
-}
-await Promise.all(processes);
diff --git a/cli/bench/http/deno_http_flash.js b/cli/bench/http/deno_http_serve.js
index a0db62630..a0db62630 100644
--- a/cli/bench/http/deno_http_flash.js
+++ b/cli/bench/http/deno_http_serve.js
diff --git a/cli/build.rs b/cli/build.rs
index 2a7327a90..ddd942593 100644
--- a/cli/build.rs
+++ b/cli/build.rs
@@ -362,7 +362,6 @@ fn create_cli_snapshot(snapshot_path: PathBuf) {
deno_http::deno_http::init_ops(),
deno_io::deno_io::init_ops(Default::default()),
deno_fs::deno_fs::init_ops::<PermissionsContainer>(false),
- deno_flash::deno_flash::init_ops::<PermissionsContainer>(false), // No --unstable
deno_node::deno_node::init_ops::<deno_runtime::RuntimeNodeEnv>(None),
cli::init_ops_and_esm(), // NOTE: This needs to be init_ops_and_esm!
];
diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs
index b661e135a..1d70a9cb7 100644
--- a/cli/tests/integration/run_tests.rs
+++ b/cli/tests/integration/run_tests.rs
@@ -4230,13 +4230,6 @@ itest!(config_file_lock_true {
exit_code: 10,
});
-// TODO(bartlomieju): this test is flaky on CI, reenable it after debugging
-// // Check https://github.com/denoland/deno_std/issues/2882
-// itest!(flash_shutdown {
-// args: "run --unstable --allow-net run/flash_shutdown/main.ts",
-// exit_code: 0,
-// });
-
itest!(permission_args {
args: "run run/001_hello.js --allow-net",
output: "run/permission_args.out",
diff --git a/cli/tests/testdata/run/flash_shutdown/main.ts b/cli/tests/testdata/run/flash_shutdown/main.ts
deleted file mode 100644
index 5e0908efb..000000000
--- a/cli/tests/testdata/run/flash_shutdown/main.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
-
-// Deno.serve caused segfault with this example after #16383
-// refs:
-// - https://github.com/denoland/deno/pull/16383
-// - https://github.com/denoland/deno_std/issues/2882
-// - revert https://github.com/denoland/deno/pull/16610
-
-const ctl = new AbortController();
-Deno.serve(() =>
- new Promise((resolve) => {
- resolve(new Response(new TextEncoder().encode("ok")));
- ctl.abort();
- }), {
- signal: ctl.signal,
- async onListen({ port }) {
- const a = await fetch(`http://localhost:${port}`, {
- method: "POST",
- body: "",
- });
- await a.text();
- },
-});