Skip to content

Commit 4a3bb44

Browse files
committed
Add markers integration tests
Signed-off-by: Yves Bastide <yves@botify.com>
1 parent f0b901c commit 4a3bb44

File tree

7 files changed

+307
-19
lines changed

7 files changed

+307
-19
lines changed

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ def read(fname):
8080
'click',
8181
'psutil>=3.2.1',
8282
'pytz',
83+
'typing',
8384
]
8485
if PY2:
8586
DEPS += [

tests/integration/__init__.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,23 @@ def conn(self):
5050
if not hasattr(self, "_conn"):
5151
self._conn = boto.swf.connect_to_region(self.region)
5252
return self._conn
53+
54+
def get_events(self, run_id):
55+
response = self.conn.get_workflow_execution_history(
56+
self.domain,
57+
run_id,
58+
self.workflow_id,
59+
)
60+
events = response['events']
61+
next_page = response.get('nextPageToken')
62+
while next_page is not None:
63+
response = self.conn.get_workflow_execution_history(
64+
self.domain,
65+
run_id,
66+
self.workflow_id,
67+
next_page_token=next_page,
68+
)
69+
70+
events.extend(response['events'])
71+
next_page = response.get('nextPageToken')
72+
return events
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
interactions:
2+
- request:
3+
body: !!python/unicode '{"domain": "TestDomain", "workflowType": {"version": "example",
4+
"name": "example"}}'
5+
headers:
6+
Authorization: ['AWS4-HMAC-SHA256 Credential=1234AB/20160823/us-east-1/swf/aws4_request,SignedHeaders=host;x-amz-date;x-amz-target,Signature=foobar']
7+
Content-Encoding: [amz-1.0]
8+
Content-Length: ['83']
9+
Content-Type: [application/json; charset=UTF-8]
10+
Host: [swf.us-east-1.amazonaws.com]
11+
User-Agent: [Boto/2.46.1 Python/2.7.12+ Linux/4.8.0-38-generic]
12+
X-Amz-Date: [20170303T103000Z]
13+
X-Amz-Target: [com.amazonaws.swf.service.model.SimpleWorkflowService.DescribeWorkflowType]
14+
method: POST
15+
uri: https://swf.us-east-1.amazonaws.com/
16+
response:
17+
body: {string: !!python/unicode '{"configuration":{"defaultChildPolicy":"TERMINATE","defaultExecutionStartToCloseTimeout":"300","defaultTaskList":{"name":"None"},"defaultTaskStartToCloseTimeout":"300"},"typeInfo":{"creationDate":1.487851963534E9,"status":"REGISTERED","workflowType":{"name":"example","version":"example"}}}'}
18+
headers:
19+
content-length: ['290']
20+
content-type: [application/json]
21+
x-amzn-requestid: [5b64c228-fffc-11e6-bc39-2f26f01a61e7]
22+
status: {code: 200, message: OK}
23+
- request:
24+
body: !!python/unicode '{"domain": "TestDomain", "taskList": {"name": "test-simpleflow-workflow-b3bc4bd5de8d48cf8908c8b00a834e79"},
25+
"childPolicy": "TERMINATE", "input": "{\"args\":[true],\"kwargs\":{}}", "workflowType":
26+
{"version": "example", "name": "example"}, "workflowId": "test-simpleflow-workflow"}'
27+
headers:
28+
Authorization: ['AWS4-HMAC-SHA256 Credential=1234AB/20160823/us-east-1/swf/aws4_request,SignedHeaders=host;x-amz-date;x-amz-target,Signature=foobar']
29+
Content-Encoding: [amz-1.0]
30+
Content-Length: ['280']
31+
Content-Type: [application/json; charset=UTF-8]
32+
Host: [swf.us-east-1.amazonaws.com]
33+
User-Agent: [Boto/2.46.1 Python/2.7.12+ Linux/4.8.0-38-generic]
34+
X-Amz-Date: [20170303T103001Z]
35+
X-Amz-Target: [com.amazonaws.swf.service.model.SimpleWorkflowService.StartWorkflowExecution]
36+
method: POST
37+
uri: https://swf.us-east-1.amazonaws.com/
38+
response:
39+
body: {string: !!python/unicode '{"runId":"22whTBuUw1fjwfLHU4XuHBL+uPmpOpU2900LflTOTTVg0="}'}
40+
headers:
41+
content-length: ['58']
42+
content-type: [application/json]
43+
x-amzn-requestid: [5b9ebdef-fffc-11e6-a472-65992fd150a3]
44+
status: {code: 200, message: OK}
45+
- request:
46+
body: !!python/unicode '{"domain": "TestDomain", "execution": {"workflowId": "test-simpleflow-workflow",
47+
"runId": "22whTBuUw1fjwfLHU4XuHBL+uPmpOpU2900LflTOTTVg0="}}'
48+
headers:
49+
Authorization: ['AWS4-HMAC-SHA256 Credential=1234AB/20160823/us-east-1/swf/aws4_request,SignedHeaders=host;x-amz-date;x-amz-target,Signature=foobar']
50+
Content-Encoding: [amz-1.0]
51+
Content-Length: ['140']
52+
Content-Type: [application/json; charset=UTF-8]
53+
Host: [swf.us-east-1.amazonaws.com]
54+
User-Agent: [Boto/2.46.1 Python/2.7.12+ Linux/4.8.0-38-generic]
55+
X-Amz-Date: [20170303T103003Z]
56+
X-Amz-Target: [com.amazonaws.swf.service.model.SimpleWorkflowService.DescribeWorkflowExecution]
57+
method: POST
58+
uri: https://swf.us-east-1.amazonaws.com/
59+
response:
60+
body: {string: !!python/unicode '{"executionConfiguration":{"childPolicy":"TERMINATE","executionStartToCloseTimeout":"300","taskList":{"name":"test-simpleflow-workflow-b3bc4bd5de8d48cf8908c8b00a834e79"},"taskStartToCloseTimeout":"300"},"executionInfo":{"cancelRequested":false,"closeStatus":"COMPLETED","closeTimestamp":1.488537003712E9,"execution":{"runId":"22whTBuUw1fjwfLHU4XuHBL+uPmpOpU2900LflTOTTVg0=","workflowId":"test-simpleflow-workflow"},"executionStatus":"CLOSED","startTimestamp":1.488537001561E9,"workflowType":{"name":"example","version":"example"}},"openCounts":{"openActivityTasks":0,"openChildWorkflowExecutions":0,"openDecisionTasks":0,"openLambdaFunctions":0,"openTimers":0}}'}
61+
headers:
62+
content-length: ['661']
63+
content-type: [application/json]
64+
x-amzn-requestid: [5d13f8a2-fffc-11e6-8d43-f7a87b88066c]
65+
status: {code: 200, message: OK}
66+
- request:
67+
body: !!python/unicode '{"domain": "TestDomain", "execution": {"workflowId": "test-simpleflow-workflow",
68+
"runId": "22whTBuUw1fjwfLHU4XuHBL+uPmpOpU2900LflTOTTVg0="}}'
69+
headers:
70+
Authorization: ['AWS4-HMAC-SHA256 Credential=1234AB/20160823/us-east-1/swf/aws4_request,SignedHeaders=host;x-amz-date;x-amz-target,Signature=foobar']
71+
Content-Encoding: [amz-1.0]
72+
Content-Length: ['140']
73+
Content-Type: [application/json; charset=UTF-8]
74+
Host: [swf.us-east-1.amazonaws.com]
75+
User-Agent: [Boto/2.46.1 Python/2.7.12+ Linux/4.8.0-38-generic]
76+
X-Amz-Date: [20170303T103104Z]
77+
X-Amz-Target: [com.amazonaws.swf.service.model.SimpleWorkflowService.GetWorkflowExecutionHistory]
78+
method: POST
79+
uri: https://swf.us-east-1.amazonaws.com/
80+
response:
81+
body: {string: !!python/unicode '{"events":[{"eventId":1,"eventTimestamp":1.488537001561E9,"eventType":"WorkflowExecutionStarted","workflowExecutionStartedEventAttributes":{"childPolicy":"TERMINATE","executionStartToCloseTimeout":"300","input":"{\"args\":[true],\"kwargs\":{}}","parentInitiatedEventId":0,"taskList":{"name":"test-simpleflow-workflow-b3bc4bd5de8d48cf8908c8b00a834e79"},"taskStartToCloseTimeout":"300","workflowType":{"name":"example","version":"example"}}},{"decisionTaskScheduledEventAttributes":{"startToCloseTimeout":"300","taskList":{"name":"test-simpleflow-workflow-b3bc4bd5de8d48cf8908c8b00a834e79"}},"eventId":2,"eventTimestamp":1.488537001561E9,"eventType":"DecisionTaskScheduled"},{"decisionTaskStartedEventAttributes":{"identity":"{\"hostname\":\"zeb-Precision-T3610\",\"pid\":7418,\"user\":\"zeb\"}","scheduledEventId":2},"eventId":3,"eventTimestamp":1.488537001621E9,"eventType":"DecisionTaskStarted"},{"decisionTaskCompletedEventAttributes":{"scheduledEventId":2,"startedEventId":3},"eventId":4,"eventTimestamp":1.488537002044E9,"eventType":"DecisionTaskCompleted"},{"eventId":5,"eventTimestamp":1.488537002044E9,"eventType":"MarkerRecorded","markerRecordedEventAttributes":{"decisionTaskCompletedEventId":4,"markerName":"marker
82+
1"}},{"eventId":6,"eventTimestamp":1.488537002044E9,"eventType":"TimerStarted","timerStartedEventAttributes":{"decisionTaskCompletedEventId":4,"startToFireTimeout":"0","timerId":"_simpleflow_wake_up_timer"}},{"eventId":7,"eventTimestamp":1.488537002167E9,"eventType":"TimerFired","timerFiredEventAttributes":{"startedEventId":6,"timerId":"_simpleflow_wake_up_timer"}},{"decisionTaskScheduledEventAttributes":{"startToCloseTimeout":"300","taskList":{"name":"test-simpleflow-workflow-b3bc4bd5de8d48cf8908c8b00a834e79"}},"eventId":8,"eventTimestamp":1.488537002167E9,"eventType":"DecisionTaskScheduled"},{"decisionTaskStartedEventAttributes":{"identity":"{\"hostname\":\"zeb-Precision-T3610\",\"pid\":7416,\"user\":\"zeb\"}","scheduledEventId":8},"eventId":9,"eventTimestamp":1.48853700224E9,"eventType":"DecisionTaskStarted"},{"decisionTaskCompletedEventAttributes":{"scheduledEventId":8,"startedEventId":9},"eventId":10,"eventTimestamp":1.488537002693E9,"eventType":"DecisionTaskCompleted"},{"eventId":11,"eventTimestamp":1.488537002693E9,"eventType":"MarkerRecorded","markerRecordedEventAttributes":{"decisionTaskCompletedEventId":10,"details":"\"some
83+
details\"","markerName":"marker 1"}},{"eventId":12,"eventTimestamp":1.488537002693E9,"eventType":"TimerStarted","timerStartedEventAttributes":{"decisionTaskCompletedEventId":10,"startToFireTimeout":"0","timerId":"_simpleflow_wake_up_timer"}},{"eventId":13,"eventTimestamp":1.48853700271E9,"eventType":"TimerFired","timerFiredEventAttributes":{"startedEventId":12,"timerId":"_simpleflow_wake_up_timer"}},{"decisionTaskScheduledEventAttributes":{"startToCloseTimeout":"300","taskList":{"name":"test-simpleflow-workflow-b3bc4bd5de8d48cf8908c8b00a834e79"}},"eventId":14,"eventTimestamp":1.48853700271E9,"eventType":"DecisionTaskScheduled"},{"decisionTaskStartedEventAttributes":{"identity":"{\"hostname\":\"zeb-Precision-T3610\",\"pid\":7418,\"user\":\"zeb\"}","scheduledEventId":14},"eventId":15,"eventTimestamp":1.488537002771E9,"eventType":"DecisionTaskStarted"},{"decisionTaskCompletedEventAttributes":{"scheduledEventId":14,"startedEventId":15},"eventId":16,"eventTimestamp":1.488537003206E9,"eventType":"DecisionTaskCompleted"},{"eventId":17,"eventTimestamp":1.488537003206E9,"eventType":"MarkerRecorded","markerRecordedEventAttributes":{"decisionTaskCompletedEventId":16,"details":"\"2nd
84+
marker''s details\"","markerName":"marker 2"}},{"eventId":18,"eventTimestamp":1.488537003206E9,"eventType":"TimerStarted","timerStartedEventAttributes":{"decisionTaskCompletedEventId":16,"startToFireTimeout":"0","timerId":"_simpleflow_wake_up_timer"}},{"eventId":19,"eventTimestamp":1.488537003233E9,"eventType":"TimerFired","timerFiredEventAttributes":{"startedEventId":18,"timerId":"_simpleflow_wake_up_timer"}},{"decisionTaskScheduledEventAttributes":{"startToCloseTimeout":"300","taskList":{"name":"test-simpleflow-workflow-b3bc4bd5de8d48cf8908c8b00a834e79"}},"eventId":20,"eventTimestamp":1.488537003233E9,"eventType":"DecisionTaskScheduled"},{"decisionTaskStartedEventAttributes":{"identity":"{\"hostname\":\"zeb-Precision-T3610\",\"pid\":7416,\"user\":\"zeb\"}","scheduledEventId":20},"eventId":21,"eventTimestamp":1.488537003291E9,"eventType":"DecisionTaskStarted"},{"decisionTaskCompletedEventAttributes":{"scheduledEventId":20,"startedEventId":21},"eventId":22,"eventTimestamp":1.488537003712E9,"eventType":"DecisionTaskCompleted"},{"eventId":23,"eventTimestamp":1.488537003712E9,"eventType":"WorkflowExecutionCompleted","workflowExecutionCompletedEventAttributes":{"decisionTaskCompletedEventId":22,"result":"null"}}]}'}
85+
headers:
86+
content-length: ['4796']
87+
content-type: [application/json]
88+
x-amzn-requestid: [816a56b1-fffc-11e6-ad40-e15570700f4f]
89+
status: {code: 200, message: OK}
90+
version: 1
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
interactions:
2+
- request:
3+
body: !!python/unicode '{"domain": "TestDomain", "workflowType": {"version": "example",
4+
"name": "example"}}'
5+
headers:
6+
Authorization: ['AWS4-HMAC-SHA256 Credential=1234AB/20160823/us-east-1/swf/aws4_request,SignedHeaders=host;x-amz-date;x-amz-target,Signature=foobar']
7+
Content-Encoding: [amz-1.0]
8+
Content-Length: ['83']
9+
Content-Type: [application/json; charset=UTF-8]
10+
Host: [swf.us-east-1.amazonaws.com]
11+
User-Agent: [Boto/2.46.1 Python/2.7.12+ Linux/4.8.0-38-generic]
12+
X-Amz-Date: [20170303T103105Z]
13+
X-Amz-Target: [com.amazonaws.swf.service.model.SimpleWorkflowService.DescribeWorkflowType]
14+
method: POST
15+
uri: https://swf.us-east-1.amazonaws.com/
16+
response:
17+
body: {string: !!python/unicode '{"configuration":{"defaultChildPolicy":"TERMINATE","defaultExecutionStartToCloseTimeout":"300","defaultTaskList":{"name":"None"},"defaultTaskStartToCloseTimeout":"300"},"typeInfo":{"creationDate":1.487851963534E9,"status":"REGISTERED","workflowType":{"name":"example","version":"example"}}}'}
18+
headers:
19+
content-length: ['290']
20+
content-type: [application/json]
21+
x-amzn-requestid: [81cbb03e-fffc-11e6-b185-d14df3ef102b]
22+
status: {code: 200, message: OK}
23+
- request:
24+
body: !!python/unicode '{"domain": "TestDomain", "taskList": {"name": "test-simpleflow-workflow-7ac796d690e44e95b3e5255093f5dd9e"},
25+
"childPolicy": "TERMINATE", "input": "{\"args\":[false],\"kwargs\":{}}", "workflowType":
26+
{"version": "example", "name": "example"}, "workflowId": "test-simpleflow-workflow"}'
27+
headers:
28+
Authorization: ['AWS4-HMAC-SHA256 Credential=1234AB/20160823/us-east-1/swf/aws4_request,SignedHeaders=host;x-amz-date;x-amz-target,Signature=foobar']
29+
Content-Encoding: [amz-1.0]
30+
Content-Length: ['281']
31+
Content-Type: [application/json; charset=UTF-8]
32+
Host: [swf.us-east-1.amazonaws.com]
33+
User-Agent: [Boto/2.46.1 Python/2.7.12+ Linux/4.8.0-38-generic]
34+
X-Amz-Date: [20170303T103105Z]
35+
X-Amz-Target: [com.amazonaws.swf.service.model.SimpleWorkflowService.StartWorkflowExecution]
36+
method: POST
37+
uri: https://swf.us-east-1.amazonaws.com/
38+
response:
39+
body: {string: !!python/unicode '{"runId":"22+pRaR6QEN8eXvOv5TdgnTHjXNwgmKLmnSL60QB0F2gc="}'}
40+
headers:
41+
content-length: ['58']
42+
content-type: [application/json]
43+
x-amzn-requestid: [82078139-fffc-11e6-89c8-a95ed3fb3064]
44+
status: {code: 200, message: OK}
45+
- request:
46+
body: !!python/unicode '{"domain": "TestDomain", "execution": {"workflowId": "test-simpleflow-workflow",
47+
"runId": "22+pRaR6QEN8eXvOv5TdgnTHjXNwgmKLmnSL60QB0F2gc="}}'
48+
headers:
49+
Authorization: ['AWS4-HMAC-SHA256 Credential=1234AB/20160823/us-east-1/swf/aws4_request,SignedHeaders=host;x-amz-date;x-amz-target,Signature=foobar']
50+
Content-Encoding: [amz-1.0]
51+
Content-Length: ['140']
52+
Content-Type: [application/json; charset=UTF-8]
53+
Host: [swf.us-east-1.amazonaws.com]
54+
User-Agent: [Boto/2.46.1 Python/2.7.12+ Linux/4.8.0-38-generic]
55+
X-Amz-Date: [20170303T103108Z]
56+
X-Amz-Target: [com.amazonaws.swf.service.model.SimpleWorkflowService.DescribeWorkflowExecution]
57+
method: POST
58+
uri: https://swf.us-east-1.amazonaws.com/
59+
response:
60+
body: {string: !!python/unicode '{"executionConfiguration":{"childPolicy":"TERMINATE","executionStartToCloseTimeout":"300","taskList":{"name":"test-simpleflow-workflow-7ac796d690e44e95b3e5255093f5dd9e"},"taskStartToCloseTimeout":"300"},"executionInfo":{"cancelRequested":false,"closeStatus":"COMPLETED","closeTimestamp":1.488537067133E9,"execution":{"runId":"22+pRaR6QEN8eXvOv5TdgnTHjXNwgmKLmnSL60QB0F2gc=","workflowId":"test-simpleflow-workflow"},"executionStatus":"CLOSED","startTimestamp":1.488537066006E9,"workflowType":{"name":"example","version":"example"}},"openCounts":{"openActivityTasks":0,"openChildWorkflowExecutions":0,"openDecisionTasks":0,"openLambdaFunctions":0,"openTimers":0}}'}
61+
headers:
62+
content-length: ['661']
63+
content-type: [application/json]
64+
x-amzn-requestid: [837dcd8f-fffc-11e6-b96c-a3a53c1bebac]
65+
status: {code: 200, message: OK}
66+
- request:
67+
body: !!python/unicode '{"domain": "TestDomain", "execution": {"workflowId": "test-simpleflow-workflow",
68+
"runId": "22+pRaR6QEN8eXvOv5TdgnTHjXNwgmKLmnSL60QB0F2gc="}}'
69+
headers:
70+
Authorization: ['AWS4-HMAC-SHA256 Credential=1234AB/20160823/us-east-1/swf/aws4_request,SignedHeaders=host;x-amz-date;x-amz-target,Signature=foobar']
71+
Content-Encoding: [amz-1.0]
72+
Content-Length: ['140']
73+
Content-Type: [application/json; charset=UTF-8]
74+
Host: [swf.us-east-1.amazonaws.com]
75+
User-Agent: [Boto/2.46.1 Python/2.7.12+ Linux/4.8.0-38-generic]
76+
X-Amz-Date: [20170303T103207Z]
77+
X-Amz-Target: [com.amazonaws.swf.service.model.SimpleWorkflowService.GetWorkflowExecutionHistory]
78+
method: POST
79+
uri: https://swf.us-east-1.amazonaws.com/
80+
response:
81+
body: {string: !!python/unicode '{"events":[{"eventId":1,"eventTimestamp":1.488537066006E9,"eventType":"WorkflowExecutionStarted","workflowExecutionStartedEventAttributes":{"childPolicy":"TERMINATE","executionStartToCloseTimeout":"300","input":"{\"args\":[false],\"kwargs\":{}}","parentInitiatedEventId":0,"taskList":{"name":"test-simpleflow-workflow-7ac796d690e44e95b3e5255093f5dd9e"},"taskStartToCloseTimeout":"300","workflowType":{"name":"example","version":"example"}}},{"decisionTaskScheduledEventAttributes":{"startToCloseTimeout":"300","taskList":{"name":"test-simpleflow-workflow-7ac796d690e44e95b3e5255093f5dd9e"}},"eventId":2,"eventTimestamp":1.488537066006E9,"eventType":"DecisionTaskScheduled"},{"decisionTaskStartedEventAttributes":{"identity":"{\"hostname\":\"zeb-Precision-T3610\",\"pid\":7432,\"user\":\"zeb\"}","scheduledEventId":2},"eventId":3,"eventTimestamp":1.48853706613E9,"eventType":"DecisionTaskStarted"},{"decisionTaskCompletedEventAttributes":{"scheduledEventId":2,"startedEventId":3},"eventId":4,"eventTimestamp":1.488537066545E9,"eventType":"DecisionTaskCompleted"},{"eventId":5,"eventTimestamp":1.488537066545E9,"eventType":"MarkerRecorded","markerRecordedEventAttributes":{"decisionTaskCompletedEventId":4,"markerName":"marker
82+
1"}},{"eventId":6,"eventTimestamp":1.488537066545E9,"eventType":"MarkerRecorded","markerRecordedEventAttributes":{"decisionTaskCompletedEventId":4,"details":"\"some
83+
details\"","markerName":"marker 1"}},{"eventId":7,"eventTimestamp":1.488537066545E9,"eventType":"MarkerRecorded","markerRecordedEventAttributes":{"decisionTaskCompletedEventId":4,"details":"\"2nd
84+
marker''s details\"","markerName":"marker 2"}},{"eventId":8,"eventTimestamp":1.488537066545E9,"eventType":"TimerStarted","timerStartedEventAttributes":{"decisionTaskCompletedEventId":4,"startToFireTimeout":"0","timerId":"_simpleflow_wake_up_timer"}},{"eventId":9,"eventTimestamp":1.488537066568E9,"eventType":"TimerFired","timerFiredEventAttributes":{"startedEventId":8,"timerId":"_simpleflow_wake_up_timer"}},{"decisionTaskScheduledEventAttributes":{"startToCloseTimeout":"300","taskList":{"name":"test-simpleflow-workflow-7ac796d690e44e95b3e5255093f5dd9e"}},"eventId":10,"eventTimestamp":1.488537066568E9,"eventType":"DecisionTaskScheduled"},{"decisionTaskStartedEventAttributes":{"identity":"{\"hostname\":\"zeb-Precision-T3610\",\"pid\":7431,\"user\":\"zeb\"}","scheduledEventId":10},"eventId":11,"eventTimestamp":1.488537066699E9,"eventType":"DecisionTaskStarted"},{"decisionTaskCompletedEventAttributes":{"scheduledEventId":10,"startedEventId":11},"eventId":12,"eventTimestamp":1.488537067133E9,"eventType":"DecisionTaskCompleted"},{"eventId":13,"eventTimestamp":1.488537067133E9,"eventType":"WorkflowExecutionCompleted","workflowExecutionCompletedEventAttributes":{"decisionTaskCompletedEventId":12,"result":"null"}}]}'}
85+
headers:
86+
content-length: ['2810']
87+
content-type: [application/json]
88+
x-amzn-requestid: [a70a250a-fffc-11e6-829c-39b40098ba3b]
89+
status: {code: 200, message: OK}
90+
version: 1

tests/integration/test_commands.py

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from sure import expect
66

77
import simpleflow.command
8-
98
from . import vcr, VCRIntegrationTest
109

1110

@@ -115,24 +114,7 @@ def test_simpleflow_idempotent(self):
115114
start_line = [line for line in lines if line.startswith(self.workflow_id)][0]
116115
_, run_id = start_line.split(" ", 1)
117116

118-
response = self.conn.get_workflow_execution_history(
119-
self.domain,
120-
run_id,
121-
self.workflow_id,
122-
)
123-
124-
events = response['events']
125-
next_page = response.get('nextPageToken')
126-
while next_page is not None:
127-
response = self.conn.get_workflow_execution_history(
128-
self.domain,
129-
run_id,
130-
self.workflow_id,
131-
next_page_token=next_page,
132-
)
133-
134-
events.extend(response['events'])
135-
next_page = response.get('nextPageToken')
117+
events = self.get_events(run_id)
136118

137119
activities = [
138120
e['activityTaskScheduledEventAttributes']['activityId']

0 commit comments

Comments
 (0)