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

[Bug] Mocha times out (no matter the timeout set) #357

Closed
acheong08 opened this issue Apr 8, 2024 · 2 comments
Closed

[Bug] Mocha times out (no matter the timeout set) #357

acheong08 opened this issue Apr 8, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@acheong08
Copy link

acheong08 commented Apr 8, 2024

What are you really trying to do?

Run npm test on hello-world

Describe the bug

$ mocha --exit --require ts-node/register --require source-map-support/register src/mocha/*.test.ts


  greet activity
    ✓ successfully greets the user

  Example workflow with mocks
    1) "before all" hook for "successfully completes the Workflow with a mocked Activity"

  Example workflow
    2) "before all" hook for "successfully completes the Workflow"


  1 passing (12s)
  2 failing

  1) Example workflow with mocks
       "before all" hook for "successfully completes the Workflow with a mocked Activity":
     Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/acheong/Projects/skand/v2/samples-typescript/hello-world/src/mocha/workflows-mocks.test.ts)
      at listOnTimeout (node:internal/timers:573:17)
      at processTimers (node:internal/timers:514:7)

  2) Example workflow
       "before all" hook for "successfully completes the Workflow":
     Error: Timeout of 10000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/acheong/Projects/skand/v2/samples-typescript/hello-world/src/mocha/workflows.test.ts)
      at listOnTimeout (node:internal/timers:573:17)
      at processTimers (node:internal/timers:514:7)

Minimal Reproduction

$ git clone https://github.com/temporalio/samples-typescript

$ cd hello-world

$ npm i

$ npm test

Environment/Versions

  • OS and processor: Linux x86_64
  • Temporal Version: 1.9.3
  • Are you using Docker or Kubernetes or building Temporal from source? No
@acheong08 acheong08 added the bug Something isn't working label Apr 8, 2024
@acheong08
Copy link
Author

Looks like it's an issue of the first run:

Failed to start ephemeral server: Temp download file at /tmp/temporal-sdk-typescript-1.9.3.downloading not complete after 20 seconds. Make sure another download isn't running for too long and delete the temp file.

Depends on internet speed. How do I pre-fetch this?

@acheong08
Copy link
Author

$ rm /tmp/temporal-sdk-typescript-1.9.3.downloading

Set timeout to a very long time, run again, then set the timeout back to a reasonable value.

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

No branches or pull requests

1 participant