[Bug] Jest worker process leak in model client.test.ts due to uncleaned timers
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- api, testing-qa
Research direction
Start with rock/ts-sdk/src/model/client.test.ts and run pnpm test:unit, then use Jest's --detectOpenHandles option to identify the active timer. Clean up the leaked timer in the test teardown, and verify that all tests pass without the worker-exit warning.
Written by the indexing model from the issue text.
Description
Bug Description
rock/ts-sdk/src/model/client.test.ts 中的 Jest 单元测试存在 timer 泄漏问题,导致 Jest worker 进程无法正常退出,被强制终止。
Steps to Reproduce
- cd rock/ts-sdk
- pnpm test:unit
- 测试全部通过后,观察控制台输出的警告信息
Expected Behavior
所有单元测试通过后,Jest 进程正常退出,无任何警告。
Actual Behavior
所有测试通过,但 Jest 打印 worker 泄漏警告并强制终止 worker 进程。
Error Logs
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.
Environment Information
- OS: [e.g. Ubuntu 22.04, macOS 13.0, Windows 11]
- Python Version: [e.g. 3.11.5]
- ROCK Version: [e.g. 0.2.0]
- Installation Method: [e.g. pip install rl-rock, source installation with uv]
- Docker Version: [e.g. 24.0.6] (if using sandbox features)
- Deployment Type: [e.g. local, distributed, ray]
ROCK Configuration
- Runtime Environment Type: uv
- Sandbox Image: python:3.11
- Resource Allocation: default
Component Affected
- Sandbox
- Actions
- Deployments
- SDK & API
- Envhub
- CLI
- Performance & Optimization
- Documentation & Examples
- Dominant language
- Python
- Stars
- 485
- Forks
- 81
- Avg merge
- 17h 45m
- Merged PRs (30d)
- 5
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from alibaba/ROCK
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-2 days Newbie friendliness 75/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100