chore: regression test for listenQueue not blocking main thread (#34537)
## Summary
Locks in the fix for
[#25308](https://github.com/denoland/deno/issues/25308):
calling `kv.listenQueue(...)` without `await` must not starve sibling
tasks
like `kv.get()` and `Deno.serve()` on the main thread.
The bug was reported on Deno 1.46.1 and reliably reproduced with the
two-module example from the issue. It no longer reproduces on `main` —
the ext/kv JS rewrite (the dequeue loop now awaits a proper async op
each iteration and yields control on every turn) resolved it. This PR
adds the spec test that would have failed against the regressed version,
so we don't lose the property silently.
The spec mirrors the reporter's setup: a separate module does
`await Deno.openKv(...)` and fires off `kv.listenQueue(async () => {})`
without `await`, then the importing module performs a `kv.get()` and
spins up `Deno.serve(...)`. Both must complete; the test exits 0.
## Test plan
- [x] `cargo test -p specs_tests --test specs --
kv_listen_queue_non_blocking`
passes locally
- [x] Verified the test catches a regressed listenQueue by simulating a
microtask-busy loop (kv.get never resolves under that scenario)
Closes denoland/orchid#274
Co-authored-by: divybot <divybot@users.noreply.github.com>
Co-authored-by: Divy Srivastava <me@littledivy.com>