awslabs / awslabs/aws-crt-nodejs
aws_logger handle is not closed while running jest tests.
- Dominant language
- TypeScript
- Stars
- 43
- Forks
- 32
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 1
Description
While running jest for my nodejs tests, I am noticing that the "aws_logger" handle is not getting closed resulting in automation tests failing.
Jest has detected the following 1 open handle potentially keeping Jest from exiting:
● aws_logger
1 | const {PromiseSocket, TimeoutError} = require("promise-socket");
> 2 | const { mqtt, io, iot } = require('aws-crt');
| ^
3 | const fs = require( "fs" );
4 | const { loginUser, logoutUser } = require( "./aws-cognito" );
5 | const cfg = require( './aws-config.json' )
at Runtime._loadModule (node_modules/jest-runtime/build/index.js:1180:29)
at Object. (node_modules/aws-crt/lib/native/binding.js:40:19)
at Object. (node_modules/aws-crt/lib/native/crt.ts:22:1)
at Object. (node_modules/aws-crt/lib/index.ts:18:1)
at Object. (tests/server.spec.js:2:27)
at TestScheduler.scheduleTests (node_modules/@jest/core/build/TestScheduler.js:333:13)
at runJest (node_modules/@jest/core/build/runJest.js:404:19)
at _run10000 (node_modules/@jest/core/build/cli/index.js:320:7)
at runCLI (node_modules/@jest/core/build/cli/index.js:173:3)
error Command failed with exit code 1.
Contributor guide
Research direction
Start by reproducing the Jest failure from tests/server.spec.js, then trace the reported open handle through node_modules/aws-crt/lib/native/binding.js and the related crt entry points. Done means the aws_logger handle is closed and Jest exits without reporting an open handle.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, node.js
- Domain
- backend, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100