@@ -35,9 +35,6 @@ describe('Real Flow Execution', () => {
3535 expect ( run . run_id ) . toBeDefined ( ) ;
3636 expect ( run . flow_slug ) . toBe ( testFlow . slug ) ;
3737
38- // Give realtime subscription time to establish properly
39- await new Promise ( ( resolve ) => setTimeout ( resolve , 2000 ) ) ;
40-
4138 // Poll for task
4239 const tasks = await readAndStart ( sql , sqlClient , testFlow . slug , 1 , 5 ) ;
4340
@@ -111,9 +108,6 @@ describe('Real Flow Execution', () => {
111108 const step = run . step ( 'event_step' ) ;
112109 step . on ( '*' , stepTracker . callback ) ;
113110
114- // Give realtime subscription time to establish
115- await new Promise ( ( resolve ) => setTimeout ( resolve , 100 ) ) ;
116-
117111 // Poll and complete task
118112 const tasks = await readAndStart ( sql , sqlClient , testFlow . slug , 1 , 5 ) ;
119113 await sqlClient . completeTask ( tasks [ 0 ] , { hello : 'world' } ) ;
@@ -217,9 +211,6 @@ describe('Real Flow Execution', () => {
217211 const tracker = createEventTracker ( ) ;
218212 dependentStep . on ( '*' , tracker . callback ) ;
219213
220- // Give realtime subscription time to establish
221- await new Promise ( ( resolve ) => setTimeout ( resolve , 100 ) ) ;
222-
223214 // Complete root step - this will trigger dependent_step to start
224215 const rootTasks = await readAndStart ( sql , sqlClient , testFlow . slug , 1 , 5 ) ;
225216 expect ( rootTasks [ 0 ] . step_slug ) . toBe ( 'root_step' ) ;
@@ -401,9 +392,6 @@ describe('Real Flow Execution', () => {
401392 expect ( step . status ) . toBe ( FlowStepStatus . Started ) ;
402393 expect ( step . started_at ) . toBeDefined ( ) ;
403394
404- // Give realtime subscription time to establish
405- await new Promise ( ( resolve ) => setTimeout ( resolve , 100 ) ) ;
406-
407395 // waitForStatus should resolve immediately since step is already Started
408396 const waitPromise = step . waitForStatus ( FlowStepStatus . Started , {
409397 timeoutMs : 5000 ,
0 commit comments