-
Notifications
You must be signed in to change notification settings - Fork 312
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
All tests timeout on fresh API generation on Windows 10. #106
Comments
I'm having the same issue on Windows 8.1 Also tried running jest with the |
Hi There is a problem if you update mockgoose to the lastest version, it would not work. Could you provide us more details ? Regards |
@maustand Thanks for the reply. Using the same code base on Mac last night, I was able to run all of the The core issue appears to be an ongoing bug with Jest's parallelization on Windows. (Adding |
So commenting out Neither v6.0.8 (generator default) or v7.3.3 (latest release) of mockgoose are working. |
@hboylan Sadly i dont have windows and i could not reproduce this bug in my pc. Currently i working on ubuntu 16.4, So It works perfect, but i tried to update to a newer version of mockgoose and it does not work, even if you update jest to v21.0.0 or a newer version, it does not work too.. If you need, i could send you my configuration or just check this package.json Regards |
Thanks for looking into it. Windows always has the best Node bugs. ;) For now, running Jest in serial without Mockgoose is a viable solution. It didn't work for me, but I noticed the Mockgoose example wraps Mongoose with I can help clean dependencies and/or deprecation warnings if you like. |
I updated the dependencies 2 weeks ago but PR are welcome !
Go ahead !
Thanks you so munch !
…On 7 November 2017 at 17:30, Hugh Boylan ***@***.***> wrote:
Thanks for looking into it. Windows always has the best Node bugs. ;)
For now, running Jest in serial without Mockgoose is a viable solution. It
didn't work for me, but I noticed the Mockgoose example
<https://www.npmjs.com/package/mockgoose#example> wraps Mongoose with
prepareStorage().
I can help clean dependencies and/or deprecation warnings if you like.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#106 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AFPJmmgLbc8oE0gBJuFvQAfhrtigI7Odks5s0HeJgaJpZM4PVvTI>
.
|
Hey, I figured out why Mockgoose isn't working! ✖️ import mockgoose from 'mockgoose'
import mongoose from 'mongoose'
beforeAll(async () => {
await mockgoose(mongoose)
mongoose.connect(mongo.uri)
}) ✔️ import {Mockgoose} from 'mockgoose'
import mongoose from 'mongoose'
const mockgoose = new Mockgoose(mongoose)
beforeAll(async () => {
await mockgoose.prepareStorage()
await mongoose.connect(mongo.uri, mongo.opts)
}) @misleadingTitle This fixes the timeout issue for me. |
Thanks @hboylan, this fixed it for me too! |
@hboylan hey, I have been trying your fix but I can't make it work. This is what I got when I try npm test
Any idea why? |
@marcoshuck I forget the specific reason for that error, but I think it had something to do with the mockgoose version being used. For instance, maybe updating to the latest version of it breaks that syntax... |
On a fresh generation of the REST API on Windows 10 all the tests timeout with errors similar to this:
I've tried to get the exact packages version listed in the npm package (instead of the most recent ones) but nothing changed. I've also tried on differend windows machines (both Windows 10 and 7) without success. Node and mongo are updated to latest versions.
I haven't found anyone else with this issue so far and it seems strange. What can be the problem?
It might be partially mockgoose related since removing the mock and using a real database makes the firsts tests pass but then, after an handful of passed tests, all the following cases timeout.
Any idea?
The text was updated successfully, but these errors were encountered: