You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SDK should support creating timer inside the orchestration
end-to-end example
it("should be able to run an single timer",async()=>{constdelay=3constsingleTimer: TOrchestrator=asyncfunction*(ctx: OrchestrationContext,startVal: number): any{yieldctx.createTimer(delay)};taskHubWorker.addOrchestrator(singleTimer);awaittaskHubWorker.start();constid=awaittaskHubClient.scheduleNewOrchestration(singleTimer);conststate=awaittaskHubClient.waitForOrchestrationCompletion(id,undefined,30);constexpectedCompletionSecond=state?.createdAt?.getTime()!+delay*1000;constactualCompletionSecond=state?.lastUpdatedAt?.getTime();expect(state);expect(state?.name).toEqual(getName(singleTimer));expect(state?.instanceId).toEqual(id);expect(state?.failureDetails).toBeUndefined();expect(state?.runtimeStatus).toEqual(OrchestrationStatus.ORCHESTRATION_STATUS_COMPLETED);expect(state?.createdAt).toBeDefined();expect(state?.lastUpdatedAt).toBeDefined();expect(expectedCompletionSecond).toBeLessThanOrEqual(actualCompletionSecond!);},31000);
The SDK should support creating timer inside the orchestration
end-to-end example
Tested on local, already support.
Reference: #4
The text was updated successfully, but these errors were encountered: