summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatt Mastracci <matthew@mastracci.com>2024-02-28 09:12:43 -0700
committerGitHub <noreply@github.com>2024-02-28 09:12:43 -0700
commita3f982c1d58a4c96377348aae203ab3f2c234729 (patch)
tree47a2968e50fa80c25b7fd4e8f9edb72f024f895d /tests
parentc2c4e745a5db4f2e53aa70bf22b6c828fa1b4040 (diff)
chore(cli): rename `--trace-ops` to `--trace-leaks` (#22598)
As we add tracing to more types of runtime activity, `--trace-ops` is less useful of a name. `--trace-leaks` better reflects that this feature traces both ops and timers, and will eventually trace resource opening as well. This keeps `--trace-ops` as an alias for `--trace-leaks`, but prints a warning to the console suggesting migration to `--trace-leaks`. One test continues to use `--trace-ops` to test the deprecation warning. --------- Signed-off-by: Matt Mastracci <matthew@mastracci.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/test_tests.rs6
-rw-r--r--tests/testdata/test/sanitizer/ops_sanitizer_multiple_timeout_tests_no_trace.out4
-rw-r--r--tests/testdata/test/sanitizer/ops_sanitizer_unstable.out2
3 files changed, 7 insertions, 5 deletions
diff --git a/tests/integration/test_tests.rs b/tests/integration/test_tests.rs
index f9b47fdbc..cf02872e4 100644
--- a/tests/integration/test_tests.rs
+++ b/tests/integration/test_tests.rs
@@ -231,7 +231,7 @@ itest!(ops_sanitizer_timeout_failure {
itest!(ops_sanitizer_multiple_timeout_tests {
args:
- "test --trace-ops test/sanitizer/ops_sanitizer_multiple_timeout_tests.ts",
+ "test --trace-leaks test/sanitizer/ops_sanitizer_multiple_timeout_tests.ts",
exit_code: 1,
output: "test/sanitizer/ops_sanitizer_multiple_timeout_tests.out",
});
@@ -243,13 +243,13 @@ itest!(ops_sanitizer_multiple_timeout_tests_no_trace {
});
itest!(sanitizer_trace_ops_catch_error {
- args: "test -A --trace-ops test/sanitizer/trace_ops_caught_error/main.ts",
+ args: "test -A --trace-leaks test/sanitizer/trace_ops_caught_error/main.ts",
exit_code: 0,
output: "test/sanitizer/trace_ops_caught_error/main.out",
});
itest!(ops_sanitizer_closed_inside_started_before {
- args: "test --trace-ops test/sanitizer/ops_sanitizer_closed_inside_started_before.ts",
+ args: "test --trace-leaks test/sanitizer/ops_sanitizer_closed_inside_started_before.ts",
exit_code: 1,
output: "test/sanitizer/ops_sanitizer_closed_inside_started_before.out",
});
diff --git a/tests/testdata/test/sanitizer/ops_sanitizer_multiple_timeout_tests_no_trace.out b/tests/testdata/test/sanitizer/ops_sanitizer_multiple_timeout_tests_no_trace.out
index 0d2863b9c..3a08089b7 100644
--- a/tests/testdata/test/sanitizer/ops_sanitizer_multiple_timeout_tests_no_trace.out
+++ b/tests/testdata/test/sanitizer/ops_sanitizer_multiple_timeout_tests_no_trace.out
@@ -8,12 +8,12 @@ test 2 ... FAILED ([WILDCARD])
test 1 => [WILDCARD]/ops_sanitizer_multiple_timeout_tests.ts:[WILDCARD]
error: Leaks detected:
- 2 async operations to sleep for a duration were started in this test, but never completed. This is often caused by not cancelling a `setTimeout` or `setInterval` call.
-To get more details where ops were leaked, run again with --trace-ops flag.
+To get more details where leaks occurred, run again with the --trace-leaks flag.
test 2 => [WILDCARD]/ops_sanitizer_multiple_timeout_tests.ts:[WILDCARD]
error: Leaks detected:
- 2 async operations to sleep for a duration were started in this test, but never completed. This is often caused by not cancelling a `setTimeout` or `setInterval` call.
-To get more details where ops were leaked, run again with --trace-ops flag.
+To get more details where leaks occurred, run again with the --trace-leaks flag.
FAILURES
diff --git a/tests/testdata/test/sanitizer/ops_sanitizer_unstable.out b/tests/testdata/test/sanitizer/ops_sanitizer_unstable.out
index 90990caf5..1e0fa1d0d 100644
--- a/tests/testdata/test/sanitizer/ops_sanitizer_unstable.out
+++ b/tests/testdata/test/sanitizer/ops_sanitizer_unstable.out
@@ -1,3 +1,5 @@
+⚠️ The `--trace-ops` flag is deprecated and will be removed in Deno 2.0.
+Use the `--trace-leaks` flag instead.
Check [WILDCARD]/ops_sanitizer_unstable.ts
running 2 tests from [WILDCARD]/ops_sanitizer_unstable.ts
no-op ... ok ([WILDCARD])