From e2f7e031b3155d43f8ba073d0abdb551ce227a29 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 26 Nov 2024 19:32:30 -0500 Subject: [PATCH] chore: fix flaky `specs::publish::npm_workspace_jsr_pkg_with_npm_dep::dep_and_workspace_dep` (#27098) Closes https://github.com/denoland/deno/issues/27097 --- tests/specs/mod.rs | 18 ++++-------------- .../__test__.jsonc | 1 + .../node_modules/.deno/.deno.lock | 0 .../node_modules/.deno/.deno.lock.poll | 1 - .../node_modules/.deno/.setup-cache.bin | Bin 24 -> 0 bytes .../node_modules/add | 1 - .../node_modules/add-dep | 1 - 7 files changed, 5 insertions(+), 17 deletions(-) delete mode 100644 tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/.deno/.deno.lock delete mode 100644 tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/.deno/.deno.lock.poll delete mode 100644 tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/.deno/.setup-cache.bin delete mode 120000 tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/add delete mode 120000 tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/add-dep diff --git a/tests/specs/mod.rs b/tests/specs/mod.rs index b4c8781d31..f5820e4d88 100644 --- a/tests/specs/mod.rs +++ b/tests/specs/mod.rs @@ -17,7 +17,6 @@ use file_test_runner::collection::CollectTestsError; use file_test_runner::collection::CollectedCategoryOrTest; use file_test_runner::collection::CollectedTest; use file_test_runner::collection::CollectedTestCategory; -use file_test_runner::SubTestResult; use file_test_runner::TestResult; use once_cell::sync::Lazy; use serde::Deserialize; @@ -256,19 +255,10 @@ fn run_test(test: &CollectedTest) -> TestResult { if metadata.ignore { TestResult::Ignored } else if let Some(repeat) = metadata.repeat { - TestResult::SubTests( - (0..repeat) - .map(|i| { - let diagnostic_logger = diagnostic_logger.clone(); - SubTestResult { - name: format!("run {}", i + 1), - result: TestResult::from_maybe_panic(AssertUnwindSafe(|| { - run_test_inner(&metadata, &cwd, diagnostic_logger); - })), - } - }) - .collect(), - ) + for _ in 0..repeat { + run_test_inner(&metadata, &cwd, diagnostic_logger.clone()); + } + TestResult::Passed } else { run_test_inner(&metadata, &cwd, diagnostic_logger.clone()); TestResult::Passed diff --git a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/__test__.jsonc b/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/__test__.jsonc index 91408a7302..b0ec621436 100644 --- a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/__test__.jsonc +++ b/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/__test__.jsonc @@ -1,4 +1,5 @@ { + "tempDir": true, "tests": { "dep_and_workspace_dep": { "steps": [{ diff --git a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/.deno/.deno.lock b/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/.deno/.deno.lock deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/.deno/.deno.lock.poll b/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/.deno/.deno.lock.poll deleted file mode 100644 index 56a6051ca2..0000000000 --- a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/.deno/.deno.lock.poll +++ /dev/null @@ -1 +0,0 @@ -1 \ No newline at end of file diff --git a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/.deno/.setup-cache.bin b/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/.deno/.setup-cache.bin deleted file mode 100644 index 4ac5fc6cf890b46738523c4d4d9d964e312f368f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24 KcmZQzzzzTa7ytnP diff --git a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/add b/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/add deleted file mode 120000 index 7b086589df..0000000000 --- a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/add +++ /dev/null @@ -1 +0,0 @@ -../add \ No newline at end of file diff --git a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/add-dep b/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/add-dep deleted file mode 120000 index 7b086589df..0000000000 --- a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/add-dep +++ /dev/null @@ -1 +0,0 @@ -../add \ No newline at end of file