Skip to content

Commit

Permalink
restore request hack
Browse files Browse the repository at this point in the history
  • Loading branch information
mmastrac committed Feb 14, 2024
1 parent 2549baf commit 01bc8a5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cli/tools/test/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,17 @@ pub async fn run_tests_for_worker(
if fail_fast_tracker.should_stop() {
break;
}

// Each test needs a fresh reqwest connection pool to avoid inter-test weirdness with connections
// failing. If we don't do this, a connection to a test server we just tore down might be re-used in
// the next test.
// TODO(mmastrac): this should be some sort of callback that we can implement for any subsystem
worker
.js_runtime
.op_state()
.borrow_mut()
.try_take::<deno_runtime::deno_fetch::reqwest::Client>();

if desc.ignore {
sender.send(TestEvent::Result(desc.id, TestResult::Ignored, 0))?;
continue;
Expand Down

0 comments on commit 01bc8a5

Please sign in to comment.