temporalio / temporalio/samples-typescript

[Bug] Jest detects open handle

Open
#189 5 comments 4 reactions 1 assignee View on GitHub

@mjameswh is already working on this.

Since Nov 21, 2022.

bug
Dominant language
TypeScript
Stars
465
Forks
148
Avg merge
1d 10h
Merged PRs (30d)
11

Description

cd activities-examples
npm run jest -- -t httpWorkflow

results in:

A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks. Active timers can also cause this, ensure that .unref() was called on them.

npm run jest -- -t httpWorkflow --detectOpenHandles

results in:

Jest has detected the following 1 open handle potentially keeping Jest from exiting:

  ●  neon threadsafe function

    > 1 | import { TestWorkflowEnvironment } from '@temporalio/testing';
        | ^
      2 | import { Worker, Runtime, DefaultLogger, LogEntry } from '@temporalio/worker';
      3 | import { v4 as uuid4 } from 'uuid';
      4 | import { httpWorkflow } from './workflows';

      at Object.<anonymous> (node_modules/@temporalio/worker/src/worker.ts:95:8)
      at Object.<anonymous> (node_modules/@temporalio/worker/src/index.ts:29:1)
      at Object.<anonymous> (node_modules/@temporalio/testing/src/index.ts:20:1)
      at Object.<anonymous> (src/workflows.test.ts:1:1)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.