Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Commit

Permalink
Fix test timing.
Browse files Browse the repository at this point in the history
  • Loading branch information
bartfeenstra committed Nov 19, 2017
1 parent ca026e4 commit 06ae832
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tk/tests/test_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def testWithForbiddenShould403(self):

@requests_mock.mock()
def testSuccessWithUnprocessedDocument(self, m):
m.post(self._flask_app.config['SOURCEBOX_URL'], text=PROFILE)
m.post(self._flask_app.config['SOURCEBOX_URL'], text=delayed_profile)
process_id = self._flask_app.process.submit(b'I am an excellent CV, mind you.')
response = self._flask_app_client.get('/retrieve/%s' % process_id,
headers={
Expand All @@ -254,7 +254,7 @@ def testSuccessWithProcessedDocument(self, m):
# Sleep to allow asynchronous processing of the document. This is not
# ideal as it could lead to random test failures, but it is
# unavoidable without additional tools.
sleep(9)
sleep(6)
response = self._flask_app_client.get('/retrieve/%s' % process_id,
headers={
'Accept': 'text/xml',
Expand Down

0 comments on commit 06ae832

Please sign in to comment.