question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to run tests - Server timeout

See original GitHub issue

I was trying to migrate from jest-dynamodb to dynalite but weird timeout error started appearing. I used exact same configuration from jest-dynamodb, I only updated config file name and preset. I also tried increasing jest timeout.

jest-dynalite: 3.0.0 collectCoverage: true OS: Ubuntu 16.04LTS

Coverage report is working fine.

 FAIL  test/my-test.test.js (68.543 s)
  ✕ my test (60027 ms)

  ● my test

    Timeout - Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout.

      at mapper (node_modules/jest-jasmine2/build/queueRunner.js:27:45)

  ● my test

    NetworkingError: connect ECONNREFUSED 127.0.0.1:8001Error: connect ECONNREFUSED 127.0.0.1:8001



  ● my test

    Timeout - Async callback was not invoked within the 60000 ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 60000 ms timeout specified by jest.setTimeout.

      at mapper (node_modules/jest-jasmine2/build/queueRunner.js:27:45)

(node:29000) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:8001
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
(node:29000) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:29000) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
napsta32commented, Aug 5, 2020

Found it. I just had to remove testEnvironment: "node", from jest.config.js.

1reaction
corollaricommented, Aug 5, 2020

I tried to reproduce your error in a repo but couldn’t, could you check this and compare that environment to your own? Are there any differences to the configuration files? If you change yoru configuration files to the ones on my repo does it work for you?

I also see that MOCK_DYNAMODB_ENDPOINT is not set.

That seems to be the cause of the problem, maybe jest is not properly picking up the preset? If that was the case I’d expect the whole thing to fail instead of getting a timeout tho, well let’s see if we can reproduce your problem first.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to run Codded Test due to timeout in wrapper connection
Open the Start menu, type %appdata%\TestProject\Agent\ and hit enter. ns. macOS. Open Files Finder and choose Go from the top menu ...
Read more >
typescript - Test Suite Failed to run - Stack Overflow
The timeout is referring to the the test taking longer than 5000 ms. You can set the test timeout programmatically although I don't...
Read more >
Exceeded timeout of 5000 ms for a test · Issue #11607 - GitHub
When upgrading to v27.0.5, every test now fails with the error message: thrown: "Exceeded timeout of 5000 ms for a test. Use jest.setTimeout( ......
Read more >
Timeouts - Errors and Resolutions - LambdaTest
In cases, where our servers fail to retrieve a request from your local machine for more than 120 seconds, then your tests are...
Read more >
SqlException with connection timeout during Unit Test ...
The version of SQL Server Express used by the hosted build agent has changed, so it is now trying to update it during...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found