From a66218d457859fc3498db9fbc61228c74f490cc2 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Wed, 18 Aug 2021 15:19:22 +0200 Subject: fix(runtime): event loop panics in classic workers (#11756) Classic worker scripts are now executed in the context of a Tokio runtime. This does mean we can not spawn more tokio runtimes in "op_worker_sync_fetch". We instead spawn a new thread there, that can create a new Tokio runtime that we can use to block the worker thread. --- cli/tests/integration/run_tests.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cli/tests/integration') diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index c7e0325ec..981b85199 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -1109,6 +1109,13 @@ itest!(import_file_with_colon { output: "import_file_with_colon.ts.out", http_server: true, }); + +itest!(classic_workers_event_loop { + args: + "run --enable-testing-features-do-not-use classic_workers_event_loop.js", + output: "classic_workers_event_loop.js.out", +}); + // FIXME(bartlomieju): disabled, because this test is very flaky on CI // itest!(local_sources_not_cached_in_memory { // args: "run --allow-read --allow-write no_mem_cache.js", -- cgit v1.2.3