@@ -55,9 +55,12 @@ EXPECTED_ANSWER = """{\\n\\t"login": "ClickHouse",\\n\\t"id": 54801242,\\n\\t"na
5555#####################################################################################
5656
5757# IP-address of this host accessible from the outside world. Get the first one
58- HTTP_SERVER_HOST = (
59- subprocess .check_output (["hostname" , "-i" ]).decode ("utf-8" ).strip ().split ()[0 ]
60- )
58+ try :
59+ HTTP_SERVER_HOST = (
60+ subprocess .check_output (["hostname" , "-i" ]).decode ("utf-8" ).strip ().split ()[0 ]
61+ )
62+ except :
63+ HTTP_SERVER_HOST = "127.0.0.1"
6164IS_IPV6 = is_ipv6 (HTTP_SERVER_HOST )
6265HTTP_SERVER_PORT = get_local_port (HTTP_SERVER_HOST , IS_IPV6 )
6366
@@ -275,15 +278,16 @@ def run_test(allow_range, settings, check_retries=False):
275278def main ():
276279 t , httpd = start_server ()
277280
278- settings = {"max_download_buffer_size" : 20 }
281+ settings = {"max_threads" : 1 }
282+ settings ["max_download_buffer_size" ] = 20
279283
280284 # Test Accept-Ranges=False
281285 run_test (allow_range = False , settings = settings )
282286 # Test Accept-Ranges=True, parallel download is used
283287 run_test (allow_range = True , settings = settings )
284288
285289 # Test Accept-Ranges=True, parallel download is used
286- settings = { "max_download_buffer_size" : 10 }
290+ settings [ "max_download_buffer_size" ] = 10
287291 run_test (allow_range = True , settings = settings )
288292
289293 # Test Accept-Ranges=True, parallel download is not used,
0 commit comments