mirror of
https://github.com/curl/curl.git
synced 2026-08-26 09:53:32 +03:00
pytest: improve stragglers
A fix for the tests that took the longest: - test_05: make the server close the HTTP/1.1 connection when simulating an error during a download. This eliminates waiting for a keepalive timeout - test_02: pause tests with slightly smaller documents, eliminate special setup for HTTP/2. We test stream window handling now elsewhere already - cli_hx_download: run look in 500ms steps instead of 1sec, resuming paused tranfers earlier. Closes #19809
This commit is contained in:
parent
86b346443b
commit
9cf4a400d2
5 changed files with 7 additions and 57 deletions
23
lib/http2.c
23
lib/http2.c
|
|
@ -111,9 +111,6 @@ struct cf_h2_ctx {
|
|||
uint32_t goaway_error; /* goaway error code from server */
|
||||
int32_t remote_max_sid; /* max id processed by server */
|
||||
int32_t local_max_sid; /* max id processed by us */
|
||||
#ifdef DEBUGBUILD
|
||||
int32_t stream_win_max; /* max h2 stream window size */
|
||||
#endif
|
||||
BIT(initialized);
|
||||
BIT(via_h1_upgrade);
|
||||
BIT(conn_closed);
|
||||
|
|
@ -139,18 +136,6 @@ static void cf_h2_ctx_init(struct cf_h2_ctx *ctx, bool via_h1_upgrade)
|
|||
Curl_uint32_hash_init(&ctx->streams, 63, h2_stream_hash_free);
|
||||
ctx->remote_max_sid = 2147483647;
|
||||
ctx->via_h1_upgrade = via_h1_upgrade;
|
||||
#ifdef DEBUGBUILD
|
||||
{
|
||||
const char *p = getenv("CURL_H2_STREAM_WIN_MAX");
|
||||
|
||||
ctx->stream_win_max = H2_STREAM_WINDOW_SIZE_MAX;
|
||||
if(p) {
|
||||
curl_off_t l;
|
||||
if(!curlx_str_number(&p, &l, INT_MAX))
|
||||
ctx->stream_win_max = (int32_t)l;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
ctx->initialized = TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -330,15 +315,7 @@ static int32_t cf_h2_get_desired_local_win(struct Curl_cfilter *cf,
|
|||
else if(avail < INT32_MAX)
|
||||
return (int32_t)avail;
|
||||
}
|
||||
#ifdef DEBUGBUILD
|
||||
{
|
||||
struct cf_h2_ctx *ctx = cf->ctx;
|
||||
CURL_TRC_CF(data, cf, "stream_win_max=%d", ctx->stream_win_max);
|
||||
return ctx->stream_win_max;
|
||||
}
|
||||
#else
|
||||
return H2_STREAM_WINDOW_SIZE_MAX;
|
||||
#endif
|
||||
}
|
||||
|
||||
static CURLcode cf_h2_update_local_win(struct Curl_cfilter *cf,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue