File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -426,14 +426,13 @@ describe("Query APIs E2E Tests", () => {
426426 taskHubWorker . addOrchestrator ( simpleOrchestrator ) ;
427427 await taskHubWorker . start ( ) ;
428428
429- const beforeTime = new Date ( ) ;
430- await new Promise ( ( resolve ) => setTimeout ( resolve , 100 ) ) ;
429+ // Use a wide time window to account for clock differences between client and server
430+ const beforeTime = new Date ( Date . now ( ) - 60000 ) ; // 1 minute ago
431431
432432 const id = await taskHubClient . scheduleNewOrchestration ( simpleOrchestrator ) ;
433433 await taskHubClient . waitForOrchestrationCompletion ( id , undefined , 30 ) ;
434434
435- await new Promise ( ( resolve ) => setTimeout ( resolve , 100 ) ) ;
436- const afterTime = new Date ( ) ;
435+ const afterTime = new Date ( Date . now ( ) + 60000 ) ; // 1 minute from now
437436
438437 // List with completed time filter
439438 const page = await taskHubClient . listInstanceIds ( {
You can’t perform that action at this time.
0 commit comments