Fix heartbeatTimeout of NONE and polling responses when there are no tasks (#3680)
* fix heartbeatTimeout of NONE resulting in ValueError and polling returning empty string taskToken when it shouldn't be returned * fix expected taskToken in impacted tests Co-authored-by: Clint Parham <cparham@aligntech.com>
This commit is contained in:
parent
f246d4162f
commit
b60de10c79
5 changed files with 28 additions and 13 deletions
|
|
@ -108,6 +108,24 @@ def test_activity_task_first_timeout():
|
|||
task.timeout_type.should.equal("HEARTBEAT")
|
||||
|
||||
|
||||
def test_activity_task_first_timeout_with_heartbeat_timeout_none():
|
||||
wfe = make_workflow_execution()
|
||||
|
||||
activity_task_timeouts = ACTIVITY_TASK_TIMEOUTS.copy()
|
||||
activity_task_timeouts["heartbeatTimeout"] = "NONE"
|
||||
|
||||
with freeze_time("2015-01-01 12:00:00"):
|
||||
task = ActivityTask(
|
||||
activity_id="my-activity-123",
|
||||
activity_type="foo",
|
||||
input="optional",
|
||||
scheduled_event_id=117,
|
||||
timeouts=activity_task_timeouts,
|
||||
workflow_execution=wfe,
|
||||
)
|
||||
task.first_timeout().should.be.none
|
||||
|
||||
|
||||
def test_activity_task_cannot_timeout_on_closed_workflow_execution():
|
||||
with freeze_time("2015-01-01 12:00:00"):
|
||||
wfe = make_workflow_execution()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue