@@ -3,7 +3,8 @@ import * as assert from "assert"
33import { sleep , waitForToolUse , waitForMessage } from "./utils"
44
55suite ( "Roo Code Subtasks" , ( ) => {
6- test . skip ( "Should handle subtask cancellation and resumption correctly" , async function ( ) {
6+ test ( "Should handle subtask cancellation and resumption correctly" , async function ( ) {
7+ this . timeout ( 60000 ) // Increase timeout for this test
78 const api = globalThis . api
89
910 await api . setConfiguration ( {
@@ -20,7 +21,9 @@ suite("Roo Code Subtasks", () => {
2021 "After creating the subtask, wait for it to complete and then respond with 'Parent task resumed'." ,
2122 )
2223
23- await waitForToolUse ( api , "new_task" )
24+ // Wait for the parent task to use the new_task tool
25+ // Use a longer timeout for this step as it's where the race condition occurs
26+ await waitForToolUse ( api , "new_task" , { timeout : 45000 } )
2427
2528 // Cancel the current task (which should be the subtask).
2629 await api . cancelTask ( )
@@ -40,7 +43,8 @@ suite("Roo Code Subtasks", () => {
4043 await api . startNewTask ( "You are the subtask" )
4144
4245 // Wait for the subtask to complete.
43- await waitForMessage ( api , { include : "Task complete" } )
46+ // Use a longer timeout for this step as well
47+ await waitForMessage ( api , { include : "Task complete" , timeout : 30000 } )
4448
4549 // Verify that the parent task is still not resumed. We need to wait a
4650 // bit to ensure any task resumption would have happened.
0 commit comments