File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ create or replace function net.http_get(
107
107
-- key/values to be included in request headers
108
108
headers jsonb default ' {}' ::jsonb,
109
109
-- the maximum number of milliseconds the request may take before being cancelled
110
- timeout_milliseconds int default 2000
110
+ timeout_milliseconds int default 5000
111
111
)
112
112
-- request_id reference
113
113
returns bigint
@@ -152,7 +152,7 @@ create or replace function net.http_post(
152
152
-- key/values to be included in request headers
153
153
headers jsonb default ' {"Content-Type": "application/json"}' ::jsonb,
154
154
-- the maximum number of milliseconds the request may take before being cancelled
155
- timeout_milliseconds int DEFAULT 2000
155
+ timeout_milliseconds int DEFAULT 5000
156
156
)
157
157
-- request_id reference
158
158
returns bigint
@@ -221,7 +221,7 @@ create or replace function net.http_delete(
221
221
-- key/values to be included in request headers
222
222
headers jsonb default ' {}' ::jsonb,
223
223
-- the maximum number of milliseconds the request may take before being cancelled
224
- timeout_milliseconds int default 2000
224
+ timeout_milliseconds int default 5000
225
225
)
226
226
-- request_id reference
227
227
returns bigint
Original file line number Diff line number Diff line change @@ -8,13 +8,14 @@ def test_http_get_timeout_reached(sess):
8
8
9
9
(request_id ,) = sess .execute (text (
10
10
"""
11
- select net.http_get(url := 'http://localhost:9999/p/200:b"wait%20for%20three %20seconds"pr,3 ');
11
+ select net.http_get(url := 'http://localhost:9999/p/200:b"wait%20for%20six %20seconds"pr,6 ');
12
12
"""
13
13
)).fetchone ()
14
14
15
15
sess .commit ()
16
16
17
- time .sleep (3.5 )
17
+ # wait for timeout
18
+ time .sleep (6 )
18
19
19
20
(response ,) = sess .execute (
20
21
text (
@@ -67,7 +68,8 @@ def test_many_slow_mixed_with_fast(sess):
67
68
68
69
sess .commit ()
69
70
70
- time .sleep (3 )
71
+ # wait for timeout
72
+ time .sleep (6 )
71
73
72
74
(status_code ,count ) = sess .execute (text (
73
75
"""
You can’t perform that action at this time.
0 commit comments