-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
Issue - Unassigned / ActionableClear and approved. Available for contributors to pick up.Clear and approved. Available for contributors to pick up.bugSomething isn't workingSomething isn't working
Description
Version
v3.11.16
What happened?
Two tests in the CheckpointService test suite are failing due to timeout errors in the beforeEach hook:
- RepoPerTaskCheckpointService#events › emits checkpoint event when saving checkpoint
- RepoPerTaskCheckpointService#events › emits error event when an error occurs
The error indicates that the beforeEach hook exceeded the default Jest timeout of 5000ms. The specific error occurs in ShadowCheckpointService.test.ts:65.
Error message:
thrown: "Exceeded timeout of 5000 ms for a hook.
Add a timeout value to this test to increase the timeout, if this is a long-running test."
Steps to reproduce
- Run the test suite with
npm run test - Observe the failures in CheckpointService tests
- Note that the beforeEach hook at line 65 in src/services/checkpoints/tests/ShadowCheckpointService.test.ts times out
Relevant output
● CheckpointService › RepoPerTaskCheckpointService#events › emits checkpoint event when saving checkpoint
thrown: "Exceeded timeout of 5000 ms for a hook.
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."
63 | let service: RepoPerTaskCheckpointService | RepoPerWorkspaceCheckpointService
64 |
> 65 | beforeEach(async () => {
| ^
66 | jest.mocked(require("globby").globby).mockClear().mockResolvedValue([])
67 |
68 | const shadowDir = path.join(tmpDir, `${prefix}-${Date.now()}`)
Additional context
- The failing tests are in the CheckpointService test suite
- The issue appears to be in the beforeEach hook setup
- The hook involves mocking globby and setting up a shadow directory
- The default Jest timeout of 5000ms is being exceeded
- This may indicate that the beforeEach hook is performing operations that are taking longer than expected
- The test suite overall ran 1382 tests with 1358 passing, 2 failing, and 22 pending
cc @cte
dosubot
Metadata
Metadata
Assignees
Labels
Issue - Unassigned / ActionableClear and approved. Available for contributors to pick up.Clear and approved. Available for contributors to pick up.bugSomething isn't workingSomething isn't working
Type
Projects
Status
Done