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
3 changes: 1 addition & 2 deletions api/envoy/api/v2/route/route.proto
Original file line number Diff line number Diff line change
Expand Up @@ -574,8 +574,7 @@ message RouteAction {
// fires, the stream is terminated with a 408 Request Timeout error code if no
// upstream response header has been received, otherwise a stream reset
// occurs.
google.protobuf.Duration idle_timeout = 24
[(validate.rules).duration.gt = {}, (gogoproto.stdduration) = true];
google.protobuf.Duration idle_timeout = 24 [(gogoproto.stdduration) = true];

// Indicates that the route has a retry policy. Note that if this is set,
// it'll take precedence over the virtual host level retry policy entirely
Expand Down
6 changes: 4 additions & 2 deletions test/common/router/config_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5036,8 +5036,10 @@ name: ZeroIdleTimeout
idle_timeout: 0s
)EOF";

EXPECT_THROW_WITH_REGEX(parseRouteConfigurationFromV2Yaml(ZeroIdleTimeout), EnvoyException,
"value must be greater than \" \"0s");
TestConfigImpl config(parseRouteConfigurationFromV2Yaml(ZeroIdleTimeout), factory_context_, true);
Http::TestHeaderMapImpl headers = genRedirectHeaders("idle.lyft.com", "/regex", true, false);
const RouteEntry* route_entry = config.route(headers, 0)->routeEntry();
EXPECT_EQ(0, route_entry->idleTimeout().value().count());
}

TEST_F(RouteConfigurationV2, ExplicitIdleTimeout) {
Expand Down