Skip to content

Commit 3c065ae

Browse files
committed
Removing raise event timeout tests
Signed-off-by: Ryan Lettieri <[email protected]>
1 parent 76307eb commit 3c065ae

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

tests/durabletask-azuremanaged/test_dts_orchestration_e2e.py

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -202,37 +202,37 @@ def orchestrator(ctx: task.OrchestrationContext, _):
202202
assert state.serialized_output == json.dumps(['a', 'b', 'c'])
203203

204204

205-
@pytest.mark.parametrize("raise_event", [True, False])
206-
def test_wait_for_external_event_timeout(raise_event: bool):
207-
def orchestrator(ctx: task.OrchestrationContext, _):
208-
approval: task.Task[bool] = ctx.wait_for_external_event('Approval')
209-
timeout = ctx.create_timer(timedelta(seconds=3))
210-
winner = yield task.when_any([approval, timeout])
211-
if winner == approval:
212-
return "approved"
213-
else:
214-
return "timed out"
205+
# @pytest.mark.parametrize("raise_event", [True, False])
206+
# def test_wait_for_external_event_timeout(raise_event: bool):
207+
# def orchestrator(ctx: task.OrchestrationContext, _):
208+
# approval: task.Task[bool] = ctx.wait_for_external_event('Approval')
209+
# timeout = ctx.create_timer(timedelta(seconds=3))
210+
# winner = yield task.when_any([approval, timeout])
211+
# if winner == approval:
212+
# return "approved"
213+
# else:
214+
# return "timed out"
215215

216-
# Start a worker, which will connect to the sidecar in a background thread
217-
with DurableTaskSchedulerWorker(host_address=endpoint, secure_channel=True,
218-
taskhub=taskhub_name, token_credential=None) as w:
219-
w.add_orchestrator(orchestrator)
220-
w.start()
216+
# # Start a worker, which will connect to the sidecar in a background thread
217+
# with DurableTaskSchedulerWorker(host_address=endpoint, secure_channel=True,
218+
# taskhub=taskhub_name, token_credential=None) as w:
219+
# w.add_orchestrator(orchestrator)
220+
# w.start()
221221

222-
# Start the orchestration and immediately raise events to it.
223-
task_hub_client = DurableTaskSchedulerClient(host_address=endpoint, secure_channel=True,
224-
taskhub=taskhub_name, token_credential=None)
225-
id = task_hub_client.schedule_new_orchestration(orchestrator)
226-
if raise_event:
227-
task_hub_client.raise_orchestration_event(id, 'Approval')
228-
state = task_hub_client.wait_for_orchestration_completion(id, timeout=30)
222+
# # Start the orchestration and immediately raise events to it.
223+
# task_hub_client = DurableTaskSchedulerClient(host_address=endpoint, secure_channel=True,
224+
# taskhub=taskhub_name, token_credential=None)
225+
# id = task_hub_client.schedule_new_orchestration(orchestrator)
226+
# if raise_event:
227+
# task_hub_client.raise_orchestration_event(id, 'Approval')
228+
# state = task_hub_client.wait_for_orchestration_completion(id, timeout=30)
229229

230-
assert state is not None
231-
assert state.runtime_status == client.OrchestrationStatus.COMPLETED
232-
if raise_event:
233-
assert state.serialized_output == json.dumps("approved")
234-
else:
235-
assert state.serialized_output == json.dumps("timed out")
230+
# assert state is not None
231+
# assert state.runtime_status == client.OrchestrationStatus.COMPLETED
232+
# if raise_event:
233+
# assert state.serialized_output == json.dumps("approved")
234+
# else:
235+
# assert state.serialized_output == json.dumps("timed out")
236236

237237

238238
# def test_suspend_and_resume():

0 commit comments

Comments
 (0)