v0.32.6_fix1

This commit is contained in:
Mateusz Gruszczyński committed 2026-10-14 08:19:09 +02:00
1 parent a3d183bd4b
commit e3de084149
34 files changed
+559 -85

No files matched your search

+17
View File
@@ -11,6 +11,23 @@ mod tests {
.unwrap()
}
#[test]
fn protocol_observation_requires_a_real_http_response_version() {
let backend = backend("protocol-observed", 18090);
let client = client(&backend, AddressPolicy::new(&backend).unwrap(), false).unwrap();
assert_eq!(client.protocol_stats().last_version, None);
let shared = client.clone();
// Exercise the response-version recorder independently of the network;
// a live TLS ALPN acceptance test must still run on staging.
shared.inner.observe_protocol(Version::HTTP_11);
shared.inner.observe_protocol(Version::HTTP_2);
let observed = client.protocol_stats();
assert_eq!(observed.last_version, Some("h2"));
assert_eq!(observed.http1_responses, 1);
assert_eq!(observed.http2_responses, 1);
assert!(observed.observed_at_ms > 0);
}
#[test]
fn generation_recycles_after_request_budget() {
let backend = backend("rotation-test", 18081);