denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
94.61k stars 5.25k forks source link

Test runner prints random 'output' and 'output end' between tests #22171

Open jespertheend opened 8 months ago

jespertheend commented 8 months ago

Version: Deno 1.40.2

I'm pretty sure the tests aren't logging anything, because it only seems to happen when I run multiple test files with --parallel. If I either remove that flag or run only a single file. I'm not seeing any ------- output ------- messages logged.

image

This screenshot was taken from this GitHub Actions run.

bartlomieju commented 8 months ago

Any chance you could try on latest canary? I think it might have been caused by a PR that was later reverted (but not yet released).

jespertheend commented 8 months ago

@bartlomieju I'm using Apple Silicon so that means I'd have to build Deno from source. How old is that PR? I've been seeing this for a good few months now but only decided to report this just now. Let me know if you'd still like me to try to build canary.

bartlomieju commented 8 months ago

Oh if you've seen it for months then it's not a recent change.

Could you provide a reproduction so we could test it on our end?

jespertheend commented 8 months ago

I was worried I wouldn't be able to reproduce it without a large project, but it seems like I'm able to reproduce it with just two files after all!

for (let i=0; i<1000; i++) {
    Deno.test({
        name: "Test " + i,
        fn() {}
    })
}

Save this in two files called testA.test.js and testB.test.js and run with deno test --parallel. I got a whole bunch of logged outputs in there:

image