Skip to content

Commit

Permalink
Merge pull request #72 from fabianbuechler/reduce-server-start-timeout
Browse files Browse the repository at this point in the history
Reduce timeout in _wait_for_server_start to 25s
  • Loading branch information
matthewbalvanz-wf authored Mar 3, 2018
2 parents b782e43 + e952b37 commit 53545be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pact/pact.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def _wait_for_server_start(self):
:raises RuntimeError: If there is a problem starting the mock service.
"""
s = requests.Session()
retries = Retry(total=15, backoff_factor=0.1)
retries = Retry(total=9, backoff_factor=0.1)
s.mount('http://', HTTPAdapter(max_retries=retries))
resp = s.get(self.uri, headers=self.HEADERS)
if resp.status_code != 200:
Expand Down
4 changes: 2 additions & 2 deletions pact/test/test_pact.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ def test_wait_for_server_start_success(self):
'http://localhost:1234', headers={'X-Pact-Mock-Service': 'true'})
self.mock_HTTPAdapter.assert_called_once_with(
max_retries=self.mock_Retry.return_value)
self.mock_Retry.assert_called_once_with(total=15, backoff_factor=0.1)
self.mock_Retry.assert_called_once_with(total=9, backoff_factor=0.1)
self.assertFalse(pact._process.communicate.called)
self.assertFalse(pact._process.terminate.called)

Expand All @@ -352,7 +352,7 @@ def test_wait_for_server_start_failure(self):
'http://localhost:1234', headers={'X-Pact-Mock-Service': 'true'})
self.mock_HTTPAdapter.assert_called_once_with(
max_retries=self.mock_Retry.return_value)
self.mock_Retry.assert_called_once_with(total=15, backoff_factor=0.1)
self.mock_Retry.assert_called_once_with(total=9, backoff_factor=0.1)
pact._process.communicate.assert_called_once_with()
pact._process.terminate.assert_called_once_with()

Expand Down

0 comments on commit 53545be

Please sign in to comment.