-
-
Notifications
You must be signed in to change notification settings - Fork 629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vitest hangs without typeCast #2206
Comments
hm, strange indeed. Could you try to reduce the issue to a smallest self contained example? That way I can try to debug it locally |
I'll give it a try, our project is pretty big so it's hard to know exactly what's causing the issue. I suspect maybe 1 particular data type of one of our MySQL table is at fault so I'll try to reduce that then see if I can get a minimal repro in a public repo |
Alright, so I think I managed to repro in a more isolated environment. https://github.com/Cellule/mysql2-vitest-hang-repro Then you can run ![]() |
can't reproduce, both run cli-slow and cli-quick finish in a reasonable short time:
what's your node version? I wonder if this is related to #2090 |
So I was running with node 16.10
![]() I have also confirmed that So I guess this issue is a duplicate of #2090 |
let's keep #2090 to track this issue The problem is caused by some V8 optimiser quirks - see https://bugs.chromium.org/p/v8/issues/detail?id=14133 Possible solutions:
|
@Cellule if you have capacity feel free to work on last 2 options. Unfortunately I don't have a lot of free time right now so to ETAs from my side, but happy to guide / review PRs if someone wants to help |
Okay I know this sounds super weird, bear with me.
We just started migrating from jest to vitest in our codebase.
The machines would just hang in the CI when running them. I couldn't for the life of me figure out why.
After a lot of trial and error I narrowed it down to 1 thing.
If I pass a typeCast (empty, just calling
next()
)=> Tests run fine everything is goodIf I don't pass a typeCast => Tests hangs in CI and I can see a good extra consistent 10s additional teardown (from 7s to 17s to run a few files)
I suspect vitest doesn't like something here
node-mysql2/lib/parsers/text_parser.js
Lines 168 to 181 in 949353a
This is likely a vitest specific issue, but any insights I could get here would go a long way to help me open up an issue on their side to investigate.
Note: We're still on 2.3.3, but I confirmed the issue still happens on latest 3.6.1
For reference here's the parser with typecast and without
With typeCast
Without typeCast
The text was updated successfully, but these errors were encountered: