Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,6 @@ HttpConnectionManagerConfig::HttpConnectionManagerConfig(
strip_trailing_host_dot_(config.strip_trailing_host_dot()),
max_requests_per_connection_(PROTOBUF_GET_WRAPPED_OR_DEFAULT(
config.common_http_protocol_options(), max_requests_per_connection, 0)) {
// If idle_timeout_ was not configured in common_http_protocol_options, use value in deprecated
// idle_timeout field.
// TODO(asraa): Remove when idle_timeout is removed.
if (!idle_timeout_) {
idle_timeout_ = PROTOBUF_GET_OPTIONAL_MS(config, hidden_envoy_deprecated_idle_timeout);
}
if (!idle_timeout_) {
idle_timeout_ = std::chrono::hours(1);
} else if (idle_timeout_.value().count() == 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -776,25 +776,6 @@ TEST_F(HttpConnectionManagerConfigTest, DisabledStreamIdleTimeout) {
EXPECT_EQ(0, config.streamIdleTimeout().count());
}

// Validate that deprecated idle_timeout is still ingested.
TEST_F(HttpConnectionManagerConfigTest, DEPRECATED_FEATURE_TEST(IdleTimeout)) {
TestDeprecatedV2Api _deprecated_v2_api;
const std::string yaml_string = R"EOF(
stat_prefix: ingress_http
idle_timeout: 1s
route_config:
name: local_route
http_filters:
- name: envoy.filters.http.router
)EOF";

HttpConnectionManagerConfig config(parseHttpConnectionManagerFromYaml(yaml_string, false),
context_, date_provider_, route_config_provider_manager_,
scoped_routes_config_provider_manager_, http_tracer_manager_,
filter_config_provider_manager_);
EXPECT_EQ(1000, config.idleTimeout().value().count());
}

// Validate that idle_timeout set in common_http_protocol_options is used.
TEST_F(HttpConnectionManagerConfigTest, CommonHttpProtocolIdleTimeout) {
const std::string yaml_string = R"EOF(
Expand Down