Skip to content

Commit d11f09e

Browse files
committed
tests + learnings
1 parent a173e89 commit d11f09e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/instructions/test-workflow.instructions.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,3 +610,8 @@ Run pytest tests through VS Code's native testing integration:
610610
- Environment: `VSC_PYTHON_CI_TEST_GREP` (filter extension tests)
611611

612612
## 🧠 Agent Learnings
613+
614+
- Always ensure all async resources (promises, deferreds, event listeners) are properly cleaned up and resolved, even in early-exit or error cases (1)
615+
- When debugging, use detailed logging to trace async flow and quickly identify where tests hang (1)
616+
- Make sure your mocks and stubs (e.g., event emitters) actually invoke registered listeners, so test code matches production event flow (1)
617+
- Explicitly test both the "happy path" and all early-exit/error/cancellation paths to ensure no async resource is left unresolved (1)

src/test/testing/testController/testCancellationRunAdapters.unit.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ suite('Execution Flow Run Adapters', () => {
148148
await new Promise((resolve) => setTimeout(resolve, 50));
149149

150150
// Trigger process close event to allow promise to resolve
151-
realMockProc.trigger('close');
151+
realMockProc.trigger('close', 0, null);
152152

153153
await runPromise;
154154
});

0 commit comments

Comments
 (0)