test(admin): stabilize telemetry failure fixture
This commit is contained in:
@@ -114,10 +114,14 @@ pub(super) fn build_test_app_with_external_references(
|
|||||||
allowed_url_prefixes: Vec<String>,
|
allowed_url_prefixes: Vec<String>,
|
||||||
) -> Router {
|
) -> Router {
|
||||||
build_app(AppState {
|
build_app(AppState {
|
||||||
service: test_service_with_external_references(
|
service: test_service_with_external_references_timeout(
|
||||||
registry,
|
registry,
|
||||||
storage_root,
|
storage_root,
|
||||||
allowed_url_prefixes,
|
allowed_url_prefixes,
|
||||||
|
// This HTTP fixture asserts classification of an immediate
|
||||||
|
// upstream status. Leave headroom for CI scheduling jitter so the
|
||||||
|
// unrelated chain-timeout branch cannot win first.
|
||||||
|
10_000,
|
||||||
),
|
),
|
||||||
api_rate_limiter: crank_runtime::RequestRateLimiter::new(
|
api_rate_limiter: crank_runtime::RequestRateLimiter::new(
|
||||||
crank_runtime::RequestRateLimitConfig::new(10_000, 10_000).unwrap(),
|
crank_runtime::RequestRateLimitConfig::new(10_000, 10_000).unwrap(),
|
||||||
@@ -174,6 +178,20 @@ pub(super) fn test_service_with_external_references(
|
|||||||
registry: PostgresRegistry,
|
registry: PostgresRegistry,
|
||||||
storage_root: std::path::PathBuf,
|
storage_root: std::path::PathBuf,
|
||||||
allowed_url_prefixes: Vec<String>,
|
allowed_url_prefixes: Vec<String>,
|
||||||
|
) -> AdminService {
|
||||||
|
test_service_with_external_references_timeout(
|
||||||
|
registry,
|
||||||
|
storage_root,
|
||||||
|
allowed_url_prefixes,
|
||||||
|
2_000,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn test_service_with_external_references_timeout(
|
||||||
|
registry: PostgresRegistry,
|
||||||
|
storage_root: std::path::PathBuf,
|
||||||
|
allowed_url_prefixes: Vec<String>,
|
||||||
|
fetch_timeout_ms: u64,
|
||||||
) -> AdminService {
|
) -> AdminService {
|
||||||
let outbound_policy = crank_runtime::OutboundHttpPolicy::allowing_hosts(["127.0.0.1"]);
|
let outbound_policy = crank_runtime::OutboundHttpPolicy::allowing_hosts(["127.0.0.1"]);
|
||||||
let runtime = crank_runtime::community_with_outbound_policy(outbound_policy.clone()).build();
|
let runtime = crank_runtime::community_with_outbound_policy(outbound_policy.clone()).build();
|
||||||
@@ -189,7 +207,7 @@ pub(super) fn test_service_with_external_references(
|
|||||||
max_depth: 8,
|
max_depth: 8,
|
||||||
max_documents: 32,
|
max_documents: 32,
|
||||||
max_fetch_bytes: 64 * 1024,
|
max_fetch_bytes: 64 * 1024,
|
||||||
fetch_timeout_ms: 2_000,
|
fetch_timeout_ms,
|
||||||
max_expanded_nodes: 10_000,
|
max_expanded_nodes: 10_000,
|
||||||
})
|
})
|
||||||
.unwrap()
|
.unwrap()
|
||||||
|
|||||||
Reference in New Issue
Block a user