From 480cfda8d5a5560fe0cc3ac2d9a3b798bf23f060 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 17 Aug 2021 22:58:41 -0400 Subject: chore(tests): delete the temporary deno dir when dropping the test lsp client (#11749) --- test_util/src/lsp.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test_util/src') diff --git a/test_util/src/lsp.rs b/test_util/src/lsp.rs index 7b9fc5965..87602e3fe 100644 --- a/test_util/src/lsp.rs +++ b/test_util/src/lsp.rs @@ -21,6 +21,7 @@ use std::process::Command; use std::process::Stdio; use std::time::Duration; use std::time::Instant; +use tempfile::TempDir; lazy_static! { static ref CONTENT_TYPE_REG: Regex = @@ -97,6 +98,7 @@ pub struct LspClient { request_id: u64, start: Instant, writer: io::BufWriter, + _temp_deno_dir: TempDir, // directory will be deleted on drop } impl Drop for LspClient { @@ -179,6 +181,7 @@ impl LspClient { request_id: 1, start: Instant::now(), writer, + _temp_deno_dir: deno_dir, }) } -- cgit v1.2.3