diff --git a/aws/sdk/integration-tests/no-default-features/Cargo.toml b/aws/sdk/integration-tests/no-default-features/Cargo.toml index bb0ba9d02d63ce8ebe5e9bcc0cdf6ae7440ac0eb..ba0f497353d8f6cadc24f22152887bdcfcf4a1a6 100644 --- a/aws/sdk/integration-tests/no-default-features/Cargo.toml +++ b/aws/sdk/integration-tests/no-default-features/Cargo.toml @@ -16,6 +16,7 @@ publish = false [dev-dependencies] aws-config = { path = "../../build/aws-sdk/sdk/aws-config", default-features = false } aws-sdk-s3 = { path = "../../build/aws-sdk/sdk/s3", default-features = false } +aws-smithy-async = { path = "../../build/aws-sdk/sdk/aws-smithy-async" } futures = "0.3.25" tokio = { version = "1.8.4", features = ["full", "test-util"] } tracing-subscriber = { version = "0.3.15", features = ["env-filter"] } diff --git a/aws/sdk/integration-tests/no-default-features/tests/client-construction.rs b/aws/sdk/integration-tests/no-default-features/tests/client-construction.rs index 1a602dc985c945c75575ea320fe94cad781c8929..8f250f9322180af0304f8bc43d09cbf8692780fb 100644 --- a/aws/sdk/integration-tests/no-default-features/tests/client-construction.rs +++ b/aws/sdk/integration-tests/no-default-features/tests/client-construction.rs @@ -13,12 +13,22 @@ async fn test_clients_from_sdk_config() { } // This will fail due to lack of a connector when constructing the service client -#[test] +#[tokio::test] #[should_panic( expected = "No HTTP connector was available. Enable the `rustls` or `native-tls` crate feature or set a connector to fix this." )] -fn test_clients_from_service_config() { - let config = aws_sdk_s3::Config::builder().build(); +async fn test_clients_from_service_config() { + #[derive(Clone, Debug)] + struct StubSleep; + impl aws_smithy_async::rt::sleep::AsyncSleep for StubSleep { + fn sleep(&self, _duration: std::time::Duration) -> aws_sdk_s3::config::Sleep { + todo!() + } + } + + let config = aws_sdk_s3::Config::builder() + .sleep_impl(std::sync::Arc::new(StubSleep {})) + .build(); // This will panic due to the lack of an HTTP connector aws_sdk_s3::Client::from_conf(config); }