🔎 Search Terms
My project is a CLI app that uses TypeScript's programmatic APIs. I test it by spawning a subprocess and asserting the resulting stdout and stderr.
Tests fail sporadically in CI with unexpected context canceled\n appearing in stderr instead of an empty string. The failures always happen on Ubuntu runners in GitHub Actions, occasionally on macOS, but never on Windows.
The reproduction can be found here: https://github.com/mrazauskas/x-ts-api-context-canceled
Please have a look at all three reruns. Different test cases are failing each time, so I suspect this can be a race condition somewhere in Go code.
🕗 Version & Regression Information
- This changed between versions 6.0 and 7.0 (the reproduction is using
typescript@next)
⏯ Playground Link
No response
💻 Code
The reproduction can be found here: https://github.com/mrazauskas/x-ts-api-context-canceled
🙁 Actual behavior
Sporadic context canceled\n in stderr.
🙂 Expected behavior
An empty string in stderr.
Additional information about the issue
The issue disappears if the async APIs are used instead. The same tests are always passing, see: mrazauskas/x-ts-api-context-canceled#1
🔎 Search Terms
My project is a CLI app that uses TypeScript's programmatic APIs. I test it by spawning a subprocess and asserting the resulting
stdoutandstderr.Tests fail sporadically in CI with unexpected
context canceled\nappearing instderrinstead of an empty string. The failures always happen on Ubuntu runners in GitHub Actions, occasionally on macOS, but never on Windows.The reproduction can be found here: https://github.com/mrazauskas/x-ts-api-context-canceled
Please have a look at all three reruns. Different test cases are failing each time, so I suspect this can be a race condition somewhere in Go code.
🕗 Version & Regression Information
typescript@next)⏯ Playground Link
No response
💻 Code
The reproduction can be found here: https://github.com/mrazauskas/x-ts-api-context-canceled
🙁 Actual behavior
Sporadic
context canceled\ninstderr.🙂 Expected behavior
An empty string in
stderr.Additional information about the issue
The issue disappears if the async APIs are used instead. The same tests are always passing, see: mrazauskas/x-ts-api-context-canceled#1