Make timeout events appear at the right time in workflow history

This commit is contained in:
Jean-Baptiste Barth 2015-11-05 02:40:16 +01:00
commit 65c35bfa69
2 changed files with 14 additions and 2 deletions

View file

@ -30,6 +30,8 @@ def test_activity_task_heartbeat_timeout():
resp["events"][-2]["eventType"].should.equal("ActivityTaskTimedOut")
attrs = resp["events"][-2]["activityTaskTimedOutEventAttributes"]
attrs["timeoutType"].should.equal("HEARTBEAT")
# checks that event has been emitted at 12:05:00, not 12:05:30
resp["events"][-2]["eventTimestamp"].should.equal(1420113900)
resp["events"][-1]["eventType"].should.equal("DecisionTaskScheduled")
@ -63,6 +65,8 @@ def test_decision_task_start_to_close_timeout():
attrs.should.equal({
"scheduledEventId": 2, "startedEventId": 3, "timeoutType": "START_TO_CLOSE"
})
# checks that event has been emitted at 12:05:00, not 12:05:30
resp["events"][-2]["eventTimestamp"].should.equal(1420113900)
# Workflow Execution Start to Close timeout
# Default value in workflow helpers: 2 hours
@ -92,3 +96,5 @@ def test_workflow_execution_start_to_close_timeout():
attrs.should.equal({
"childPolicy": "ABANDON", "timeoutType": "START_TO_CLOSE"
})
# checks that event has been emitted at 14:00:00, not 14:00:30
resp["events"][-1]["eventTimestamp"].should.equal(1420120800)