Skip to content
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

npm test fails with timeout #452

Closed
v-andrew opened this issue Dec 25, 2019 · 13 comments · Fixed by #565
Closed

npm test fails with timeout #452

v-andrew opened this issue Dec 25, 2019 · 13 comments · Fixed by #565
Assignees
Labels
bug Something isn't working developer-experience

Comments

@v-andrew
Copy link

v-andrew commented Dec 25, 2019

To reproduce, run the following commands:

  • git clone https://github.com/strongloop/loopback4-example-shopping
  • cd loopback4-example-shopping
  • npm install
  • npm test

It fails with:

> lb-mocha --allow-console-logs "packages/*/dist/__tests__/**/*.js"

  !

0 passing (15ms)
1 failing
1) "before all" hook in "{root}":
Error: connect ENOENT //./pipe/docker_engine
at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1113:14)
npm ERR! Test failed.  See above for more details.
@dougal83
Copy link
Contributor

dougal83 commented Dec 25, 2019

Hi Andrew
Do you have Docker installed?

EDIT: I've just updated docker and I'm now getting the following error on win10:

lb-mocha --allow-console-logs "packages/*/dist/__tests__/**/*.js"

  !

  0 passing (30s)
  1 failing
  1) "before all" hook in "{root}":
     Error: Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
      at listOnTimeout (internal/timers.js:531:17)
      at processTimers (internal/timers.js:475:7)

EDIT2: https://www.testcontainers.org/supported_docker_environment/windows/

@dougal83 dougal83 added bug Something isn't working developer-experience labels Dec 26, 2019
@dougal83
Copy link
Contributor

dougal83 commented Jan 1, 2020

@raymondfeng Hi Raymond, I'm getting the same error below on Win 10 and Ubuntu 19. Do you have any ideas?

> loopback4-example-shopping-monorepo@1.1.1 test /home/user/dev/loopback4-example-shopping
> lb-mocha --allow-console-logs "packages/*/dist/__tests__/**/*.js"



  !

  0 passing (33s)
  1 failing

  1) "before all" hook in "{root}":
     Error: Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
      at listOnTimeout (internal/timers.js:531:17)
      at processTimers (internal/timers.js:475:7)



npm ERR! Test failed.  See above for more details.

@dougal83 dougal83 changed the title npm test fails on Windows 10 npm test fails on Windows 10/Ubuntu 19 Jan 1, 2020
@Riplar
Copy link

Riplar commented Jan 8, 2020

Experiencing the same error.

@dhmlau
Copy link
Member

dhmlau commented Jan 8, 2020

I'm using MacOS, and it seems to be working fine for me. @hacksparrow, since you're actively working on this repo, do you have some insights on this? Thanks.

> [email protected] test /Users/dhmlau/loopback/loopback4-example-shopping
> lb-mocha --allow-console-logs "packages/*/dist/__tests__/**/*.js"



  ․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․,․․,․,․․․․․․․․․․․․․․․․․․․․․․․․․․․․․

  66 passing (9s)
  3 pending

@hacksparrow
Copy link
Contributor

Hard to tell without a Windows machine.

@dougal83
Copy link
Contributor

dougal83 commented Jan 11, 2020

Hard to tell without a Windows machine.

@hacksparrow Is there anything I can run on Win 10/Ubuntu to give useful diag. info?
If it helps... https://developer.microsoft.com/en-us/windows/downloads/virtual-machines

@v-andrew I think Error: connect ENOENT //./pipe/docker_engine typically means docker is not running. This projects' test requires Docker to be installed and the service running.

@raymondfeng
Copy link
Contributor

It requires a docker engine to be running on the Windows machine.

@dougal83 dougal83 changed the title npm test fails on Windows 10/Ubuntu 19 npm test fails on Windows 10 Jan 15, 2020
@dougal83
Copy link
Contributor

Resolved Ubuntu issue, not sure what was wrong but tests now run correctly. Have completely rebuilt VM with 4Gb RAM instead of 2Gb.

@Riplar
Copy link

Riplar commented Jan 16, 2020

It would be good to document and/or update the README.md because the installation instructions do not say anything about Docker. I myself never used Docker and I have no idea what I have to do to get this working.

@dougal83
Copy link
Contributor

Working on Win 10 via WSL remote console on VSCode.

> [email protected] test /i/dev/loopback4-example-shopping
> lb-mocha --allow-console-logs "packages/*/dist/__tests__/**/*.js"

  ․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․,․․,․,․․․․․․․․․․․․․․․․․․․․․․․․․․․․․

  66 passing (14s)
  3 pending

Rel: loopbackio/loopback-next#4425

@v-andrew
Copy link
Author

v-andrew commented Feb 1, 2020

It requires a docker engine to be running on the Windows machine.

Doesn't work with Docker running

> lb-mocha --allow-console-logs "packages/*/dist/__tests__/**/*.js"

!

0 passing (30s)
1 failing

1) "before all" hook in "{root}":
Error: Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)

npm ERR! Test failed.  See above for more details.                                              

@dougal83
Copy link
Contributor

dougal83 commented Feb 1, 2020

loopbackio/loopback-next#4425

For now, using WSL or linux VM are viable options.

@dougal83 dougal83 added the os:Windows Issues specific to Windows label Feb 2, 2020
dougal83 added a commit to dougal83/loopback4-example-shopping that referenced this issue Feb 22, 2020
naming conflict introduced with use of testcontainers

fixes loopbackio#452

Signed-off-by: Douglas McConnachie <[email protected]>
@dougal83 dougal83 removed the os:Windows Issues specific to Windows label Feb 22, 2020
@dougal83 dougal83 changed the title npm test fails on Windows 10 npm test fails with timeout Feb 22, 2020
raymondfeng pushed a commit that referenced this issue Feb 24, 2020
naming conflict introduced with use of testcontainers

fixes #452

Signed-off-by: Douglas McConnachie <[email protected]>
@fishera123
Copy link

Hi, when I run tests, always getting timeout error.

> [email protected] test /loopback4-example-shopping
> lb-mocha --allow-console-logs "packages/*/dist/__tests__/**/*.js"
  !
  0 passing (31s)
  1 failing
  1) "before all" hook in "{root}":
     Error: Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
      at listOnTimeout (internal/timers.js:549:17)
      at processTimers (internal/timers.js:492:7)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working developer-experience
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants