Skip to content

Commit

Permalink
bump those timeouts...
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Beck committed Oct 21, 2019
1 parent dff06d4 commit b816207
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions test/integration/048_rpc_test/test_rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,15 @@ def poll_for_result(self, request_token, request_id=1, timeout=60, status='succe
.format(delta, status, result)
)

def async_query(self, _method, _sql=None, _test_request_id=1, macros=None, **kwargs):
def async_query(self, _method, _sql=None, _test_request_id=1, _poll_timeout=60, macros=None, **kwargs):
response = self.query(_method, _sql, _test_request_id, macros, **kwargs).json()
result = self.assertIsResult(response, _test_request_id)
self.assertIn('request_token', result)
return self.poll_for_result(result['request_token'], _test_request_id)
return self.poll_for_result(
result['request_token'],
request_id=_test_request_id,
timeout=_poll_timeout,
)

def query(self, _method, _sql=None, _test_request_id=1, macros=None, **kwargs):
built = self.build_query(_method, kwargs, _sql, _test_request_id, macros)
Expand Down Expand Up @@ -1145,7 +1149,7 @@ def test_deps_compilation_postgres(self):
status = self._check_start_predeps()

# do a dbt deps, wait for the result
self.assertIsResult(self.async_query('deps').json())
self.assertIsResult(self.async_query('deps', _poll_timeout=120).json())

self._check_deps_ok(status)

Expand All @@ -1154,7 +1158,7 @@ def test_deps_cli_compilation_postgres(self):
status = self._check_start_predeps()

# do a dbt deps, wait for the result
self.assertIsResult(self.async_query('cli_args', cli='deps').json())
self.assertIsResult(self.async_query('cli_args', cli='deps', _poll_timeout=120).json())

self._check_deps_ok(status)

Expand Down Expand Up @@ -1203,4 +1207,4 @@ def test_postgres_status_error(self):
self.assertIn('Invalid test config', str(data['message']))

# deps should work
self.assertIsResult(self.async_query('deps').json())
self.assertIsResult(self.async_query('deps', _poll_timeout=120).json())

0 comments on commit b816207

Please sign in to comment.