File tree Expand file tree Collapse file tree
aws/codegen-aws-sdk/src/test/kotlin/software/amazon/smithy/rustsdk
rust-runtime/aws-smithy-runtime/src/client Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -159,6 +159,8 @@ class TimeoutConfigMergingTest {
159159 &TimeoutConfig::builder()
160160 .read_timeout(Duration::from_secs(10))
161161 .connect_timeout(connect_timeout)
162+ .disable_operation_timeout()
163+ .disable_operation_attempt_timeout()
162164 .build(),
163165 "read timeout overridden"
164166 );
Original file line number Diff line number Diff line change @@ -220,6 +220,7 @@ pub fn default_timeout_config_plugin() -> Option<SharedRuntimePlugin> {
220220pub fn default_timeout_config_plugin_v2 (
221221 params : & DefaultPluginParams ,
222222) -> Option < SharedRuntimePlugin > {
223+ let behavior_version = params. behavior_version . unwrap_or_else ( BehaviorVersion :: latest) ;
223224 let is_aws_sdk = params. is_aws_sdk ;
224225 Some (
225226 default_plugin ( "default_timeout_config_plugin" , |components| {
@@ -228,15 +229,14 @@ pub fn default_timeout_config_plugin_v2(
228229 ) )
229230 } )
230231 . with_config ( layer ( "default_timeout_config" , |layer| {
231- let timeout_config = if is_aws_sdk {
232- // AWS SDK: Set connect_timeout, explicitly disable operation timeouts
232+ #[ allow( deprecated) ]
233+ let timeout_config = if is_aws_sdk && behavior_version. is_at_least ( BehaviorVersion :: v2025_08_07 ( ) ) {
234+ // AWS SDK with new behavior version: Set connect_timeout, leave operation timeouts unset
233235 TimeoutConfig :: builder ( )
234236 . connect_timeout ( Duration :: from_millis ( 3100 ) )
235- . disable_operation_timeout ( )
236- . disable_operation_attempt_timeout ( )
237237 . build ( )
238238 } else {
239- // Non -AWS SDK: All timeouts disabled
239+ // Old behavior versions or non -AWS SDK: All timeouts disabled
240240 TimeoutConfig :: disabled ( )
241241 } ;
242242 layer. store_put ( timeout_config) ;
You can’t perform that action at this time.
0 commit comments