Skip to content

Commit df8855b

Browse files
Adding timeout to requests in tests
1 parent a923883 commit df8855b

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

tests/source_dir/inference_tf/inference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def handler(data, context):
2020
(bytes, string): data to return to client, (optional) response content type
2121
"""
2222
processed_input = _process_input(data, context)
23-
response = requests.post(context.rest_uri, data=processed_input)
23+
response = requests.post(context.rest_uri, data=processed_input, timeout=5)
2424
return _process_output(response, context)
2525

2626

tests/source_dir/inference_tf_clean/inference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def handler(data, context):
1313
(bytes, string): data to return to client, (optional) response content type
1414
"""
1515
processed_input = _process_input(data, context)
16-
response = requests.post(context.rest_uri, data=processed_input)
16+
response = requests.post(context.rest_uri, data=processed_input, timeout=5)
1717
return _process_output(response, context)
1818

1919

tests/source_dir/inference_tf_clean_model2/inference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def handler(data, context):
1313
(bytes, string): data to return to client, (optional) response content type
1414
"""
1515
processed_input = _process_input(data, context)
16-
response = requests.post(context.rest_uri, data=processed_input)
16+
response = requests.post(context.rest_uri, data=processed_input, timeout=5)
1717
return _process_output(response, context)
1818

1919

tests/source_dir/inference_tf_model2/inference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def handler(data, context):
2020
(bytes, string): data to return to client, (optional) response content type
2121
"""
2222
processed_input = _process_input(data, context)
23-
response = requests.post(context.rest_uri, data=processed_input)
23+
response = requests.post(context.rest_uri, data=processed_input, timeout=5)
2424
return _process_output(response, context)
2525

2626

0 commit comments

Comments
 (0)