Improve gateway scheduling and runtime admission

This commit is contained in:
elky
2026-06-24 01:53:45 +08:00
parent cf0af8fa1e
commit d336d1a7fa
87 changed files with 9671 additions and 804 deletions
@@ -344,6 +344,7 @@ mod tests {
transport_proxy_is_locally_supported, TransportTunnelAffinityLookup,
TransportTunnelAttachmentOwner,
};
use aether_contracts::TRANSPORT_HTTP_MODE_H2C_PRIOR_KNOWLEDGE;
#[derive(Default)]
struct TestTunnelAffinityLookup {
@@ -589,6 +590,23 @@ mod tests {
assert_eq!(profile.pool_scope, "key");
}
#[test]
fn resolves_h2c_prior_knowledge_transport_profile() {
let mut transport = sample_transport();
transport.key.fingerprint = Some(json!({
"transport_profile": {
"profile_id": "mock-h2c",
"backend": "reqwest_rustls",
"http_mode": "h2c_prior_knowledge"
}
}));
let profile = resolve_transport_profile(&transport).expect("profile");
assert_eq!(profile.profile_id, "mock-h2c");
assert_eq!(profile.http_mode, TRANSPORT_HTTP_MODE_H2C_PRIOR_KNOWLEDGE);
}
#[test]
fn resolves_no_transport_profile_without_fingerprint_configuration() {
let mut transport = sample_transport();