Skip to content

Commit

Permalink
modify api test
Browse files Browse the repository at this point in the history
  • Loading branch information
zhihuiwan committed Jun 11, 2020
1 parent 019fa3f commit 99f2b15
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions fate_flow/tests/api_tests/job_operation_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def test_job_operation(self):
job_id = response.json()['jobId']

# query
response = requests.post("/".join([self.server_url, 'job', 'query']), json={'job_id': job_id})
response = requests.post("/".join([self.server_url, 'job', 'query']), json={'job_id': job_id, 'role': 'guest'})
self.assertTrue(int(response.json()['retcode']) == 0)
job_info = response.json()['data'][0]

Expand All @@ -42,8 +42,8 @@ def test_job_operation(self):
response = requests.post("/".join([self.server_url, 'job', 'config']), json={'job_id': job_id, 'role': job_info['f_role'], 'party_id': job_info['f_party_id']})
self.assertTrue(int(response.json()['retcode']) == 0)

print('waiting 3s ...')
time.sleep(3)
print('waiting 10s ...')
time.sleep(10)

# stop
response = requests.post("/".join([self.server_url, 'job', 'stop']), json={'job_id': job_id})
Expand Down
2 changes: 1 addition & 1 deletion fate_flow/tests/api_tests/tracking_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_tracking(self):
job_id = response.json()['jobId']
job_info = {'f_status': 'running'}
for i in range(60):
response = requests.post("/".join([self.server_url, 'job', 'query']), json={'job_id': job_id})
response = requests.post("/".join([self.server_url, 'job', 'query']), json={'job_id': job_id, 'role': 'guest'})
self.assertTrue(response.status_code in [200, 201])
job_info = response.json()['data'][0]
if job_info['f_status'] in ['success', 'failed', 'canceled']:
Expand Down

0 comments on commit 99f2b15

Please sign in to comment.