summaryrefslogtreecommitdiff
path: root/cli/tests/unit/timers_test.ts
diff options
context:
space:
mode:
authorMatt Mastracci <matthew@mastracci.com>2023-11-05 14:27:36 -0700
committerGitHub <noreply@github.com>2023-11-05 14:27:36 -0700
commit485fade0b6910e29557c6627d37985b47735bf8e (patch)
tree0f6c97c135c8a92226caecb363effe7eabf47936 /cli/tests/unit/timers_test.ts
parent4530cd5f0d5e6acdbbb11a60eac711d47f274d3f (diff)
chore: migrate to new deno_core and metrics (#21057)
- Uses the new OpMetrics system for sync and async calls - Partial revert of #21048 as we moved Array.fromAsync upstream to deno_core
Diffstat (limited to 'cli/tests/unit/timers_test.ts')
-rw-r--r--cli/tests/unit/timers_test.ts13
1 files changed, 0 insertions, 13 deletions
diff --git a/cli/tests/unit/timers_test.ts b/cli/tests/unit/timers_test.ts
index 6dedb04ed..f9beddabd 100644
--- a/cli/tests/unit/timers_test.ts
+++ b/cli/tests/unit/timers_test.ts
@@ -412,19 +412,6 @@ Deno.test(function clearTimeoutAndClearIntervalNotBeEquals() {
assertNotEquals(clearTimeout, clearInterval);
});
-Deno.test(async function timerMaxCpuBug() {
- // There was a bug where clearing a timeout would cause Deno to use 100% CPU.
- clearTimeout(setTimeout(() => {}, 1000));
- // We can check this by counting how many ops have triggered in the interim.
- // Certainly less than 10 ops should have been dispatched in next 100 ms.
- const { ops: pre } = Deno.metrics();
- await delay(100);
- const { ops: post } = Deno.metrics();
- const before = pre.op_sleep.opsDispatched;
- const after = post.op_sleep.opsDispatched;
- assert(after - before < 10);
-});
-
Deno.test(async function timerOrdering() {
const array: number[] = [];
const donePromise = deferred();