Skip to content

Commit d29c343

Browse files
committed
Fix all integration tests using replay clients to disable retries
1 parent 2b2bcd4 commit d29c343

11 files changed

Lines changed: 29 additions & 5 deletions

File tree

aws/sdk/integration-tests/cloudwatchlogs/tests/event_stream.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ async fn start_request(
5353
.region(Region::from_static(region))
5454
.http_client(replayer.clone())
5555
.with_test_defaults()
56+
.retry_config(RetryConfig::disabled())
5657
.credentials_provider(Credentials::for_tests())
5758
.build();
5859
let client = Client::from_conf(config);

aws/sdk/integration-tests/ec2/tests/waiters.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ async fn prerequisites() -> (Client, ReplayingClient, TickAdvanceTime) {
2020
ReplayingClient::from_file("tests/instance-status-ok-waiter-success.json").unwrap();
2121
let config = aws_sdk_ec2::Config::builder()
2222
.with_test_defaults()
23+
.retry_config(RetryConfig::disabled())
2324
.http_client(client.clone())
2425
.time_source(time_source.clone())
2526
.sleep_impl(sleep_impl)

aws/sdk/integration-tests/kms/tests/integration.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use aws_sdk_kms::operation::RequestId;
88
use aws_smithy_http_client::test_util::{ReplayEvent, StaticReplayClient};
99
use aws_smithy_runtime_api::client::result::SdkError;
1010
use aws_smithy_types::body::SdkBody;
11+
use aws_smithy_types::retry::RetryConfig;
1112
use http_1x::Uri;
1213
use kms::config::{Config, Credentials, Region};
1314

@@ -66,6 +67,7 @@ async fn generate_random() {
6667
.region(Region::new("us-east-1"))
6768
.credentials_provider(Credentials::for_tests_with_session_token())
6869
.with_test_defaults()
70+
.retry_config(RetryConfig::disabled())
6971
.build();
7072
let client = kms::Client::from_conf(conf);
7173
let resp = client
@@ -145,6 +147,7 @@ async fn generate_random_keystore_not_found() {
145147
.region(Region::new("us-east-1"))
146148
.credentials_provider(Credentials::for_tests_with_session_token())
147149
.with_test_defaults()
150+
.retry_config(RetryConfig::disabled())
148151
.build();
149152
let client = kms::Client::from_conf(conf);
150153

aws/sdk/integration-tests/s3/tests/checksums.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ async fn test_checksum_on_streaming_response(
9999
.region(Region::new("us-east-1"))
100100
.http_client(http_client.clone())
101101
.with_test_defaults()
102+
.retry_config(RetryConfig::disabled())
102103
.build();
103104
let client = Client::from_conf(config);
104105

@@ -188,6 +189,7 @@ async fn test_checksum_on_streaming_request<'a>(
188189
.region(Region::new("us-east-1"))
189190
.http_client(http_client.clone())
190191
.with_test_defaults()
192+
.retry_config(RetryConfig::disabled())
191193
.build();
192194
let client = Client::from_conf(config);
193195

aws/sdk/integration-tests/s3/tests/content-length-enforcement.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
use aws_sdk_s3::{config::Region, error::DisplayErrorContext, Client, Config};
6+
use aws_sdk_s3::{config::{retry::RetryConfig, Region}, error::DisplayErrorContext, Client, Config};
77
use aws_smithy_http_client::test_util::dvr::ReplayingClient;
88

99
#[tokio::test]
@@ -15,6 +15,7 @@ async fn test_content_length_enforcement_is_not_applied_to_head_request() {
1515
.with_test_defaults()
1616
.http_client(http_client.clone())
1717
.region(Region::new("us-east-1"))
18+
.retry_config(RetryConfig::disabled())
1819
.build();
1920
let client = Client::from_conf(config);
2021
let _resp = client
@@ -40,6 +41,7 @@ async fn test_content_length_enforcement_get_request_short() {
4041
.with_test_defaults()
4142
.http_client(http_client.clone())
4243
.region(Region::new("us-east-1"))
44+
.retry_config(RetryConfig::disabled())
4345
.build();
4446
let client = Client::from_conf(config);
4547
// The file we're fetching is exactly 10,000 bytes long, but we've set the
@@ -77,6 +79,7 @@ async fn test_content_length_enforcement_get_request_long() {
7779
.with_test_defaults()
7880
.http_client(http_client.clone())
7981
.region(Region::new("us-east-1"))
82+
.retry_config(RetryConfig::disabled())
8083
.build();
8184
let client = Client::from_conf(config);
8285
// The file we're fetching is exactly 10,000 bytes long, but we've set the

aws/sdk/integration-tests/s3/tests/expires_interceptor.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ fn make_client(expires_val: &str) -> Client {
2828
.region(Region::new("us-east-1"))
2929
.http_client(http_client)
3030
.with_test_defaults()
31+
.retry_config(RetryConfig::disabled())
3132
.build();
3233

3334
Client::from_conf(config)

aws/sdk/integration-tests/s3/tests/express.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use aws_config::Region;
1010
use aws_runtime::user_agent::test_util::{
1111
assert_ua_contains_metric_values, assert_ua_does_not_contain_metric_values,
1212
};
13-
use aws_sdk_s3::config::endpoint::{EndpointFuture, Params, ResolveEndpoint};
13+
use aws_sdk_s3::config::{retry::RetryConfig, endpoint::{EndpointFuture, Params, ResolveEndpoint};
1414
use aws_sdk_s3::config::{Builder, Credentials};
1515
use aws_sdk_s3::presigning::PresigningConfig;
1616
use aws_sdk_s3::primitives::SdkBody;
@@ -324,6 +324,7 @@ async fn disable_s3_express_session_auth_at_service_client_level() {
324324
.http_client(http_client)
325325
.region(Region::new("us-west-2"))
326326
.with_test_defaults()
327+
.retry_config(RetryConfig::disabled())
327328
.disable_s3_express_session_auth(true)
328329
.build();
329330
let client = Client::from_conf(conf);
@@ -352,6 +353,7 @@ async fn disable_s3_express_session_auth_at_operation_level() {
352353
.http_client(http_client)
353354
.region(Region::new("us-west-2"))
354355
.with_test_defaults()
356+
.retry_config(RetryConfig::disabled())
355357
.build();
356358
let client = Client::from_conf(conf);
357359

@@ -455,6 +457,7 @@ async fn s3_express_auth_flow_should_not_be_reached_with_no_auth_schemes() {
455457
url: "http://127.0.0.1".to_owned(),
456458
})
457459
.with_test_defaults()
460+
.retry_config(RetryConfig::disabled())
458461
.timeout_config(
459462
TimeoutConfig::builder()
460463
.operation_attempt_timeout(Duration::from_secs(1))

aws/sdk/integration-tests/s3/tests/ignore-invalid-xml-body-root.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ async fn ignore_invalid_xml_body_root() {
4747
.region(Region::new("us-east-1"))
4848
.http_client(http_client.clone())
4949
.with_test_defaults()
50+
.retry_config(RetryConfig::disabled())
5051
.build();
5152
let client = Client::from_conf(config);
5253

aws/sdk/integration-tests/s3/tests/no_auth.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
use aws_sdk_s3::config::Region;
6+
use aws_sdk_s3::config::{retry::RetryConfig, Region;
77
use aws_sdk_s3::{Client, Config};
88
use aws_smithy_http_client::test_util::capture_request;
99
use aws_smithy_http_client::test_util::dvr::ReplayingClient;
@@ -25,6 +25,7 @@ async fn list_objects() {
2525
let config = Config::from(&config)
2626
.to_builder()
2727
.with_test_defaults()
28+
.retry_config(RetryConfig::disabled())
2829
.build();
2930
let client = aws_sdk_s3::Client::from_conf(config);
3031

@@ -57,6 +58,7 @@ async fn list_objects_v2() {
5758
let config = Config::from(&config)
5859
.to_builder()
5960
.with_test_defaults()
61+
.retry_config(RetryConfig::disabled())
6062
.build();
6163
let client = Client::from_conf(config);
6264

@@ -88,6 +90,7 @@ async fn head_object() {
8890
let config = Config::from(&config)
8991
.to_builder()
9092
.with_test_defaults()
93+
.retry_config(RetryConfig::disabled())
9194
.build();
9295
let client = Client::from_conf(config);
9396

@@ -119,6 +122,7 @@ async fn get_object() {
119122
let config = Config::from(&config)
120123
.to_builder()
121124
.with_test_defaults()
125+
.retry_config(RetryConfig::disabled())
122126
.build();
123127
let client = Client::from_conf(config);
124128

@@ -170,6 +174,7 @@ async fn auth_scheme_preference_specifying_legacy_no_auth_scheme_id_should_be_su
170174
.http_client(http_client)
171175
.region(Region::new("us-east-2"))
172176
.with_test_defaults()
177+
.retry_config(RetryConfig::disabled())
173178
.auth_scheme_preference([AuthSchemeId::from("no_auth")])
174179
.build();
175180
let client = Client::from_conf(conf);

aws/sdk/integration-tests/s3/tests/signing-it.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#![cfg(feature = "test-util")]
77

88
use aws_credential_types::provider::SharedCredentialsProvider;
9-
use aws_sdk_s3::config::{Credentials, Region};
9+
use aws_sdk_s3::config::{retry::RetryConfig, {Credentials, Region};
1010
use aws_sdk_s3::primitives::ByteStream;
1111
use aws_sdk_s3::{Client, Config};
1212
use aws_smithy_http_client::test_util::{capture_request, ReplayEvent, StaticReplayClient};
@@ -30,6 +30,7 @@ async fn test_signer() {
3030
.region(Region::new("us-east-1"))
3131
.http_client(http_client.clone())
3232
.with_test_defaults()
33+
.retry_config(RetryConfig::disabled())
3334
.build();
3435
let client = Client::from_conf(config);
3536
let _ = client
@@ -47,6 +48,7 @@ async fn disable_payload_signing_works() {
4748
let (http_client, request) = capture_request(None);
4849
let conf = aws_sdk_s3::Config::builder()
4950
.with_test_defaults()
51+
.retry_config(RetryConfig::disabled())
5052
.behavior_version_latest()
5153
.region(Region::new("us-east-1"))
5254
.http_client(http_client)
@@ -80,6 +82,7 @@ async fn disable_payload_signing_works_with_checksums() {
8082
let (http_client, request) = capture_request(None);
8183
let conf = aws_sdk_s3::Config::builder()
8284
.with_test_defaults()
85+
.retry_config(RetryConfig::disabled())
8386
.behavior_version_latest()
8487
.region(Region::new("us-east-1"))
8588
.http_client(http_client)

0 commit comments

Comments
 (0)