From 0012484f4f194664bea87879ab9f4f20f4ee86c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sun, 27 Nov 2022 04:50:14 +0100 Subject: =?UTF-8?q?Revert=20"fix(ext/flash):=20graceful=20server=20startup?= =?UTF-8?q?/shutdown=20with=20unsettl=E2=80=A6=20(#16839)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …ed promises in mind (#16616)" This reverts commit fd023cf7937e67dfde5482d34ebc60839eb7397c. There are reports saying that Vite is often hanging in 1.28.2 and this is the only PR that changed something with HTTP server. I think we should hold off on trying to fix this and instead focus on #16787 CC @magurotuna --- cli/tests/watcher_tests.rs | 65 ---------------------------------------------- 1 file changed, 65 deletions(-) (limited to 'cli/tests/watcher_tests.rs') diff --git a/cli/tests/watcher_tests.rs b/cli/tests/watcher_tests.rs index 0ef9d72b5..f9c8e1508 100644 --- a/cli/tests/watcher_tests.rs +++ b/cli/tests/watcher_tests.rs @@ -1179,69 +1179,4 @@ mod watcher { check_alive_then_kill(child); } - - // https://github.com/denoland/deno/issues/16267 - #[test] - fn run_watch_flash() { - let filename = "watch_flash.js"; - let t = TempDir::new(); - let file_to_watch = t.path().join(filename); - write( - &file_to_watch, - r#" - console.log("Starting flash server..."); - Deno.serve({ - onListen() { - console.error("First server is listening"); - }, - handler: () => {}, - port: 4601, - }); - "#, - ) - .unwrap(); - - let mut child = util::deno_cmd() - .current_dir(t.path()) - .arg("run") - .arg("--watch") - .arg("--unstable") - .arg("--allow-net") - .arg("-L") - .arg("debug") - .arg(&file_to_watch) - .env("NO_COLOR", "1") - .stdout(std::process::Stdio::piped()) - .stderr(std::process::Stdio::piped()) - .spawn() - .unwrap(); - let (mut stdout_lines, mut stderr_lines) = child_lines(&mut child); - - wait_contains("Starting flash server...", &mut stdout_lines); - wait_for( - |m| m.contains("Watching paths") && m.contains(filename), - &mut stderr_lines, - ); - - write( - &file_to_watch, - r#" - console.log("Restarting flash server..."); - Deno.serve({ - onListen() { - console.error("Second server is listening"); - }, - handler: () => {}, - port: 4601, - }); - "#, - ) - .unwrap(); - - wait_contains("File change detected! Restarting!", &mut stderr_lines); - wait_contains("Restarting flash server...", &mut stdout_lines); - wait_contains("Second server is listening", &mut stderr_lines); - - check_alive_then_kill(child); - } } -- cgit v1.2.3