Skip to content

Commit fcdc10c

Browse files
authored
chore(bigquery): adjust test assertions to new default timeout (#10222)
1 parent 79d8e00 commit fcdc10c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

bigquery/tests/unit/test__http.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919

2020

2121
class TestConnection(unittest.TestCase):
22+
@staticmethod
23+
def _get_default_timeout():
24+
from google.cloud.bigquery._http import _http
25+
26+
return _http._DEFAULT_TIMEOUT
27+
2228
@staticmethod
2329
def _get_target_class():
2430
from google.cloud.bigquery._http import Connection
@@ -79,7 +85,7 @@ def test_user_agent(self):
7985
headers=expected_headers,
8086
method="GET",
8187
url=expected_uri,
82-
timeout=None,
88+
timeout=self._get_default_timeout(),
8389
)
8490
self.assertIn("my-application/1.2.3", conn.user_agent)
8591

@@ -112,5 +118,5 @@ def test_extra_headers_replace(self):
112118
headers=expected_headers,
113119
method="GET",
114120
url=expected_uri,
115-
timeout=None,
121+
timeout=self._get_default_timeout(),
116122
)

0 commit comments

Comments
 (0)