id stringlengths 22 133 | text stringlengths 40 40.2k | arch stringclasses 1
value | syntax stringclasses 1
value | kind stringclasses 4
values | repo stringclasses 27
values | path stringlengths 5 116 | license stringclasses 6
values | commit stringlengths 40 40 | source_host stringclasses 1
value | category stringclasses 16
values | source_url stringlengths 85 196 | line_start int64 1 4.28k | line_end int64 4 4.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:23 | };
($origin_interceptor:ident, $origin_ctx:ty, $destination_interceptor:ident, $destination_ctx:ty, $expected:expr) => {
interceptor_error_redirection_test!(__private $origin_interceptor, $origin_ctx, $destination_interceptor, $destination_ctx, $expected, _rc: &RuntimeComponents,);
};
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0656e34f774e36546f5348cd2abf9a3a17ea80ef | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0656e34f774e36546f5348cd2abf9a3a17ea80ef/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 881 | 940 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:24 | fn new() -> Self {
Self(
RuntimeComponentsBuilder::new("test")
.with_interceptor(SharedInterceptor::new(OriginInterceptor))
.with_interceptor(SharedInterceptor::new(DestinationInterceptor))
)
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0656e34f774e36546f5348cd2abf9a3a17ea80ef | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0656e34f774e36546f5348cd2abf9a3a17ea80ef/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 921 | 980 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:25 | &BeforeSerializationInterceptorContextRef<'_>,
modify_before_completion,
&mut FinalizerInterceptorContextMut<'_>,
expected
);
}
#[tokio::test]
#[traced_test]
async fn test_modify_before_serialization_error_causes_jump_to_modify_before_completion() {
l... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0656e34f774e36546f5348cd2abf9a3a17ea80ef | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0656e34f774e36546f5348cd2abf9a3a17ea80ef/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 961 | 1,020 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:26 | modify_before_completion,
&mut FinalizerInterceptorContextMut<'_>,
expected
);
}
#[tokio::test]
#[traced_test]
async fn test_modify_before_retry_loop_error_causes_jump_to_modify_before_completion() {
let expected = r#"DispatchFailure(DispatchFailure { source: Con... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0656e34f774e36546f5348cd2abf9a3a17ea80ef | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0656e34f774e36546f5348cd2abf9a3a17ea80ef/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,001 | 1,060 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:27 | &mut FinalizerInterceptorContextMut<'_>,
expected
);
}
#[tokio::test]
#[traced_test]
async fn test_read_before_signing_error_causes_jump_to_modify_before_attempt_completion() {
let expected = r#"DispatchFailure(DispatchFailure { source: ConnectorError { kind: Other(None), so... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0656e34f774e36546f5348cd2abf9a3a17ea80ef | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0656e34f774e36546f5348cd2abf9a3a17ea80ef/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,041 | 1,100 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:28 | expected
);
}
#[tokio::test]
#[traced_test]
async fn test_read_before_transmit_error_causes_jump_to_modify_before_attempt_completion() {
let expected = r#"DispatchFailure(DispatchFailure { source: ConnectorError { kind: Other(None), source: InterceptorError { kind: ModifyBeforeAttemptCo... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0656e34f774e36546f5348cd2abf9a3a17ea80ef | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0656e34f774e36546f5348cd2abf9a3a17ea80ef/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,081 | 1,140 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:29 | expected
);
}
#[tokio::test]
#[traced_test]
async fn test_read_before_deserialization_error_causes_jump_to_modify_before_attempt_completion(
) {
let expected = r#"ResponseError(ResponseError { source: InterceptorError { kind: ModifyBeforeAttemptCompletion, interceptor_name: Some("De... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0656e34f774e36546f5348cd2abf9a3a17ea80ef | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0656e34f774e36546f5348cd2abf9a3a17ea80ef/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,121 | 1,180 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:30 | &FinalizerInterceptorContextRef<'_>,
expected
);
}
#[tokio::test]
#[traced_test]
async fn test_modify_before_completion_error_causes_jump_to_read_after_execution() {
let expected = r#"ResponseError(ResponseError { source: InterceptorError { kind: ReadAfterExecution, intercep... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0656e34f774e36546f5348cd2abf9a3a17ea80ef | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0656e34f774e36546f5348cd2abf9a3a17ea80ef/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,161 | 1,220 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:31 | "test",
"test",
Input::doesnt_matter(),
&runtime_plugins(),
StopPoint::BeforeTransmit,
)
.await
.expect("success");
assert!(context.response().is_none());
}
/// The "finally" interceptors should run upon error when the StopPoint is... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0656e34f774e36546f5348cd2abf9a3a17ea80ef | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0656e34f774e36546f5348cd2abf9a3a17ea80ef/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,201 | 1,260 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:32 | }
fn modify_before_completion(
&self,
_context: &mut FinalizerInterceptorContextMut<'_>,
_rc: &RuntimeComponents,
_cfg: &mut ConfigBag,
) -> Result<(), BoxError> {
self.inner
.modify_before_compl... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0656e34f774e36546f5348cd2abf9a3a17ea80ef | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0656e34f774e36546f5348cd2abf9a3a17ea80ef/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,241 | 1,300 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:33 | let interceptor = TestInterceptor::default();
let runtime_plugins = || {
RuntimePlugins::new()
.with_operation_plugin(TestOperationRuntimePlugin::new())
.with_operation_plugin(NoAuthRuntimePlugin::new())
.with_operation_plugin(TestInterceptorRuntimePlu... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0656e34f774e36546f5348cd2abf9a3a17ea80ef | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0656e34f774e36546f5348cd2abf9a3a17ea80ef/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,281 | 1,317 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:13 | use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
use tracing_test::traced_test;
fn new_request_serializer() -> CannedRequestSerializer {
CannedRequestSerializer::success(HttpRequest::empty())
}
fn new_response_deserializer() -> CannedResponseDeserializer {
CannedR... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0ff4059b2486642feaa9d8354e64cac48ff02e56 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0ff4059b2486642feaa9d8354e64cac48ff02e56/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 481 | 540 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:14 | impl TestOperationRuntimePlugin {
fn new() -> Self {
Self {
builder: RuntimeComponentsBuilder::for_tests()
.with_retry_strategy(Some(SharedRetryStrategy::new(NeverRetryStrategy::new())))
.with_endpoint_resolver(Some(SharedEndpointResolver::new(... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0ff4059b2486642feaa9d8354e64cac48ff02e56 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0ff4059b2486642feaa9d8354e64cac48ff02e56/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 521 | 580 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:15 | interceptor_error_handling_test!(__private read_before_execution, $ctx, $expected,);
};
($interceptor:ident, $ctx:ty, $expected:expr) => {
interceptor_error_handling_test!(__private $interceptor, $ctx, $expected, _rc: &RuntimeComponents,);
};
(__private $interceptor:ident, $c... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0ff4059b2486642feaa9d8354e64cac48ff02e56 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0ff4059b2486642feaa9d8354e64cac48ff02e56/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 561 | 620 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:16 | impl Intercept for FailingInterceptorC {
fn name(&self) -> &'static str { "FailingInterceptorC" }
fn $interceptor(
&self,
_ctx: $ctx,
$($rc_arg)*
_cfg: &mut ConfigBag,
) -> Result<(), BoxErro... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0ff4059b2486642feaa9d8354e64cac48ff02e56 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0ff4059b2486642feaa9d8354e64cac48ff02e56/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 601 | 660 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:17 | Cow::Borrowed(&self.0)
}
}
let input = Input::doesnt_matter();
let runtime_plugins = RuntimePlugins::new()
.with_client_plugin(FailingInterceptorsClientRuntimePlugin::new())
.with_operation_plugin(TestOperationRuntimePlugin::new())
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0ff4059b2486642feaa9d8354e64cac48ff02e56 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0ff4059b2486642feaa9d8354e64cac48ff02e56/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 641 | 700 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:18 | expected
);
}
#[tokio::test]
#[traced_test]
async fn test_read_before_serialization_error_handling() {
let expected = r#""ConstructionFailure(ConstructionFailure { source: InterceptorError { kind: ReadBeforeSerialization, interceptor_name: Some(\"FailingInterceptorC\"), source: Some(\"F... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0ff4059b2486642feaa9d8354e64cac48ff02e56 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0ff4059b2486642feaa9d8354e64cac48ff02e56/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 681 | 740 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:19 | let expected = r#""DispatchFailure(DispatchFailure { source: ConnectorError { kind: Other(None), source: InterceptorError { kind: ReadBeforeAttempt, interceptor_name: Some(\"FailingInterceptorC\"), source: Some(\"FailingInterceptorC\") }, connection: Unknown } })""#.to_string();
interceptor_error_handling_test!... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0ff4059b2486642feaa9d8354e64cac48ff02e56 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0ff4059b2486642feaa9d8354e64cac48ff02e56/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 721 | 780 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:20 | #[tokio::test]
#[traced_test]
async fn test_modify_before_transmit_error_handling() {
let expected = r#""DispatchFailure(DispatchFailure { source: ConnectorError { kind: Other(None), source: InterceptorError { kind: ModifyBeforeTransmit, interceptor_name: Some(\"FailingInterceptorC\"), source: Some(\"Fa... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0ff4059b2486642feaa9d8354e64cac48ff02e56 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0ff4059b2486642feaa9d8354e64cac48ff02e56/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 761 | 820 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:21 | &mut BeforeDeserializationInterceptorContextMut<'_>,
expected
);
}
#[tokio::test]
#[traced_test]
async fn test_read_before_deserialization_error_handling() {
let expected = r#""ResponseError(ResponseError { source: InterceptorError { kind: ReadBeforeDeserialization, intercep... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0ff4059b2486642feaa9d8354e64cac48ff02e56 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0ff4059b2486642feaa9d8354e64cac48ff02e56/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 801 | 860 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:22 | async fn test_read_after_attempt_error_handling() {
let expected = r#""ResponseError(ResponseError { source: InterceptorError { kind: ReadAfterAttempt, interceptor_name: Some(\"FailingInterceptorC\"), source: Some(\"FailingInterceptorC\") }, raw: Response { status: 200, version: HTTP/1.1, headers: {}, body: Sdk... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0ff4059b2486642feaa9d8354e64cac48ff02e56 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0ff4059b2486642feaa9d8354e64cac48ff02e56/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 841 | 900 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:23 | struct OriginInterceptor;
impl Intercept for OriginInterceptor {
fn name(&self) -> &'static str { "OriginInterceptor" }
fn $origin_interceptor(
&self,
_ctx: $origin_ctx,
$($rc_arg)*
_cfg: &mut Co... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0ff4059b2486642feaa9d8354e64cac48ff02e56 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0ff4059b2486642feaa9d8354e64cac48ff02e56/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 881 | 940 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:24 | }
}
impl RuntimePlugin for InterceptorsTestOperationRuntimePlugin {
fn runtime_components(&self, _: &RuntimeComponentsBuilder) -> Cow<'_, RuntimeComponentsBuilder> {
Cow::Borrowed(&self.0)
}
}
let input = Input::doesnt_... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0ff4059b2486642feaa9d8354e64cac48ff02e56 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0ff4059b2486642feaa9d8354e64cac48ff02e56/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 921 | 980 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:25 | let expected = r#""ConstructionFailure(ConstructionFailure { source: InterceptorError { kind: ModifyBeforeCompletion, interceptor_name: Some(\"DestinationInterceptor\"), source: Some(\"DestinationInterceptor\") } })""#.to_string();
interceptor_error_redirection_test!(
modify_before_serialization,
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0ff4059b2486642feaa9d8354e64cac48ff02e56 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0ff4059b2486642feaa9d8354e64cac48ff02e56/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 961 | 1,020 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:26 | interceptor_error_redirection_test!(
modify_before_retry_loop,
&mut BeforeTransmitInterceptorContextMut<'_>,
modify_before_completion,
&mut FinalizerInterceptorContextMut<'_>,
expected
);
}
#[tokio::test]
#[traced_test]
async fn test_r... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0ff4059b2486642feaa9d8354e64cac48ff02e56 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0ff4059b2486642feaa9d8354e64cac48ff02e56/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,001 | 1,060 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:27 | read_before_signing,
&BeforeTransmitInterceptorContextRef<'_>,
modify_before_attempt_completion,
&mut FinalizerInterceptorContextMut<'_>,
expected
);
}
#[tokio::test]
#[traced_test]
async fn test_read_after_signing_error_causes_jump_to_modify_befo... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0ff4059b2486642feaa9d8354e64cac48ff02e56 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0ff4059b2486642feaa9d8354e64cac48ff02e56/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,041 | 1,100 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:28 | &BeforeTransmitInterceptorContextRef<'_>,
modify_before_attempt_completion,
&mut FinalizerInterceptorContextMut<'_>,
expected
);
}
#[tokio::test]
#[traced_test]
async fn test_read_after_transmit_error_causes_jump_to_modify_before_attempt_completion() {
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0ff4059b2486642feaa9d8354e64cac48ff02e56 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0ff4059b2486642feaa9d8354e64cac48ff02e56/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,081 | 1,140 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:29 | read_before_deserialization,
&BeforeDeserializationInterceptorContextRef<'_>,
modify_before_attempt_completion,
&mut FinalizerInterceptorContextMut<'_>,
expected
);
}
#[tokio::test]
#[traced_test]
async fn test_read_after_deserialization_error_cau... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0ff4059b2486642feaa9d8354e64cac48ff02e56 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0ff4059b2486642feaa9d8354e64cac48ff02e56/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,121 | 1,180 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:30 | modify_before_completion,
&mut FinalizerInterceptorContextMut<'_>,
read_after_execution,
&FinalizerInterceptorContextRef<'_>,
expected
);
}
#[tokio::test]
async fn test_stop_points() {
let runtime_plugins = || {
RuntimePlugins::new... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0ff4059b2486642feaa9d8354e64cac48ff02e56 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0ff4059b2486642feaa9d8354e64cac48ff02e56/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,161 | 1,220 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:31 | /// The "finally" interceptors should run upon error when the StopPoint is set to BeforeTransmit
#[tokio::test]
async fn test_stop_points_error_handling() {
#[derive(Debug, Default)]
struct Inner {
modify_before_retry_loop_called: AtomicBool,
modify_before_completion_call... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0ff4059b2486642feaa9d8354e64cac48ff02e56 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0ff4059b2486642feaa9d8354e64cac48ff02e56/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,201 | 1,260 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:32 | .store(true, Ordering::Relaxed);
Ok(())
}
fn read_after_execution(
&self,
_context: &FinalizerInterceptorContextRef<'_>,
_rc: &RuntimeComponents,
_cfg: &mut ConfigBag,
) -> Result<(), BoxError> {
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0ff4059b2486642feaa9d8354e64cac48ff02e56 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0ff4059b2486642feaa9d8354e64cac48ff02e56/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,241 | 1,300 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:33 | // StopPoint::BeforeTransmit will exit right before sending the request, so there should be no response
let context = invoke_with_stop_point(
"test",
"test",
Input::doesnt_matter(),
&runtime_plugins(),
StopPoint::BeforeTransmit,
)
.awai... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 0ff4059b2486642feaa9d8354e64cac48ff02e56 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0ff4059b2486642feaa9d8354e64cac48ff02e56/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,281 | 1,307 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
// TODO(msrvUpgrade): This can be removed once we upgrade the MSRV to Rust 1.69
#![allow(unknown_lints)]
use self::auth::orchestrate_auth;
use crate::client::interceptors::Interceptors;
use crate::clien... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 37e00f55f0aed0d28d0a92ba2f6f4fa1b6c84758 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/37e00f55f0aed0d28d0a92ba2f6f4fa1b6c84758/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
// TODO(msrvUpgrade): This can be removed once we upgrade the MSRV to Rust 1.69
#![allow(unknown_lints)]
use self::auth::orchestrate_auth;
use crate::client::interceptors::Interceptors;
use crate::clien... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:2 | mod http;
/// Utility for making one-off unmodeled requests with the orchestrator.
#[doc(hidden)]
pub mod operation;
macro_rules! halt {
([$ctx:ident] => $err:expr) => {{
debug!("encountered orchestrator error; halting");
$ctx.fail($err.into());
return;
}};
}
macro_rules! halt_on_err {... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 41 | 100 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:3 | };
(halt_on_err: $interceptor:ident($ctx:ident, $rc:ident, $cfg:ident)) => {
halt_on_err!([$ctx] => run_interceptors!(__private $interceptor($ctx, $rc, $cfg)))
};
(__private $interceptor:ident($ctx:ident, $rc:ident, $cfg:ident)) => {
Interceptors::new($rc.interceptors()).$interceptor($ctx, $... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 81 | 140 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:4 | None,
/// Stop the orchestrator before transmitting the request
BeforeTransmit,
}
/// Same as [`invoke`], but allows for returning early at different points during orchestration.
///
/// Orchestration will cease at the point specified by `stop_point`. This is useful for orchestrations
/// that don't need to a... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 121 | 180 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:5 | }
.maybe_timeout(operation_timeout_config)
.await
}
.instrument(debug_span!("invoke", service = %service_name, operation = %operation_name))
.await
}
/// Apply configuration is responsible for apply runtime plugins to the config bag, as well as running
/// `read_before_execution` intercepto... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 161 | 220 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:6 | // Before serialization
run_interceptors!(halt_on_err: {
read_before_serialization(ctx, runtime_components, cfg);
modify_before_serialization(ctx, runtime_components, cfg);
});
// Serialization
ctx.enter_serialization_phase();
{
let _span = debug_span!("serialization").enter... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 201 | 260 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:7 | // If we got a retry strategy from the bag, ask it what to do.
// Otherwise, assume we should attempt the initial request.
let should_attempt = runtime_components
.retry_strategy()
.should_attempt_initial_request(runtime_components, cfg);
match should_attempt {
// Yes, let's make a r... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 241 | 300 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:8 | // Backoff time should not be included in the attempt timeout
if let Some((delay, sleep)) = retry_delay.take() {
debug!("delaying for {delay:?}");
sleep.await;
}
let attempt_timeout_config =
MaybeTimeoutConfig::new(runtime_components, cfg, TimeoutKind::Operati... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 281 | 340 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:9 | continue;
}
}
}
}
#[instrument(skip_all, level = "debug")]
async fn try_attempt(
ctx: &mut InterceptorContext,
cfg: &mut ConfigBag,
runtime_components: &RuntimeComponents,
stop_point: StopPoint,
) {
run_interceptors!(halt_on_err: read_before_attempt(ctx, runtime_components, ... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 321 | 380 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:10 | let request = ctx.take_request().expect("set during serialization");
trace!(request = ?request, "transmitting request");
let http_client = halt_on_err!([ctx] => runtime_components.http_client().ok_or_else(||
OrchestratorError::other("No HTTP client was available to send this request. \
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 361 | 420 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:11 | .await
.map_err(OrchestratorError::response)
.and_then(|_| {
let _span = debug_span!("deserialize_nonstreaming").entered();
log_response_body(response, cfg);
response_deserializer.deserialize_nonstreaming(response)
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 401 | 460 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:12 | }
#[cfg(all(test, feature = "test-util"))]
mod tests {
use super::*;
use crate::client::auth::no_auth::{NoAuthRuntimePlugin, NO_AUTH_SCHEME_ID};
use crate::client::orchestrator::endpoints::StaticUriEndpointResolver;
use crate::client::retries::strategy::NeverRetryStrategy;
use crate::client::test_u... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 441 | 500 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:13 | fn new_request_serializer() -> CannedRequestSerializer {
CannedRequestSerializer::success(HttpRequest::empty())
}
fn new_response_deserializer() -> CannedResponseDeserializer {
CannedResponseDeserializer::new(
Response::builder()
.status(StatusCode::OK)
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 481 | 540 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:14 | Self {
builder: RuntimeComponentsBuilder::for_tests()
.with_retry_strategy(Some(SharedRetryStrategy::new(NeverRetryStrategy::new())))
.with_endpoint_resolver(Some(SharedEndpointResolver::new(
StaticUriEndpointResolver::http_localhost(8080),... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 521 | 580 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:15 | interceptor_error_handling_test!(__private $interceptor, $ctx, $expected, _rc: &RuntimeComponents,);
};
(__private $interceptor:ident, $ctx:ty, $expected:expr, $($rc_arg:tt)*) => {
#[derive(Debug)]
struct FailingInterceptorA;
impl Intercept for FailingInterceptorA {
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 561 | 620 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:16 | fn $interceptor(
&self,
_ctx: $ctx,
$($rc_arg)*
_cfg: &mut ConfigBag,
) -> Result<(), BoxError> {
tracing::debug!("FailingInterceptorC called!");
Err("FailingInterceptorC".into())
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 601 | 660 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:17 | let input = Input::doesnt_matter();
let runtime_plugins = RuntimePlugins::new()
.with_client_plugin(FailingInterceptorsClientRuntimePlugin::new())
.with_operation_plugin(TestOperationRuntimePlugin::new())
.with_operation_plugin(NoAuthRuntimePlugin::new())
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 641 | 700 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:18 | #[tokio::test]
#[traced_test]
async fn test_read_before_serialization_error_handling() {
let expected = r#""ConstructionFailure(ConstructionFailure { source: InterceptorError { kind: ReadBeforeSerialization, interceptor_name: Some(\"FailingInterceptorC\"), source: Some(\"FailingInterceptorC\") } })""#.t... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 681 | 740 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:19 | &BeforeTransmitInterceptorContextRef<'_>,
expected
);
}
#[tokio::test]
#[traced_test]
async fn test_modify_before_signing_error_handling() {
let expected = r#""DispatchFailure(DispatchFailure { source: ConnectorError { kind: Other(None), source: InterceptorError { kind: Modi... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 721 | 780 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:20 | async fn test_modify_before_transmit_error_handling() {
let expected = r#""DispatchFailure(DispatchFailure { source: ConnectorError { kind: Other(None), source: InterceptorError { kind: ModifyBeforeTransmit, interceptor_name: Some(\"FailingInterceptorC\"), source: Some(\"FailingInterceptorC\") }, connection: Un... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 761 | 820 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:21 | }
#[tokio::test]
#[traced_test]
async fn test_read_before_deserialization_error_handling() {
let expected = r#""ResponseError(ResponseError { source: InterceptorError { kind: ReadBeforeDeserialization, interceptor_name: Some(\"FailingInterceptorC\"), source: Some(\"FailingInterceptorC\") }, raw: Re... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 801 | 860 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:22 | read_after_attempt,
&FinalizerInterceptorContextRef<'_>,
expected
);
}
#[tokio::test]
#[traced_test]
async fn test_modify_before_completion_error_handling() {
let expected = r#""ResponseError(ResponseError { source: InterceptorError { kind: ModifyBeforeCompletion... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 841 | 900 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:23 | fn $origin_interceptor(
&self,
_ctx: $origin_ctx,
$($rc_arg)*
_cfg: &mut ConfigBag,
) -> Result<(), BoxError> {
tracing::debug!("OriginInterceptor called!");
Err("OriginInterceptor".in... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 881 | 940 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:24 | fn runtime_components(&self, _: &RuntimeComponentsBuilder) -> Cow<'_, RuntimeComponentsBuilder> {
Cow::Borrowed(&self.0)
}
}
let input = Input::doesnt_matter();
let runtime_plugins = RuntimePlugins::new()
.with_operation_plugin(Tes... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 921 | 980 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:25 | &mut BeforeSerializationInterceptorContextMut<'_>,
modify_before_completion,
&mut FinalizerInterceptorContextMut<'_>,
expected
);
}
#[tokio::test]
#[traced_test]
async fn test_read_before_serialization_error_causes_jump_to_modify_before_completion() {
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 961 | 1,020 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:26 | modify_before_completion,
&mut FinalizerInterceptorContextMut<'_>,
expected
);
}
#[tokio::test]
#[traced_test]
async fn test_read_before_attempt_error_causes_jump_to_modify_before_attempt_completion() {
let expected = r#""DispatchFailure(DispatchFailure { source:... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,001 | 1,060 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:27 | &mut FinalizerInterceptorContextMut<'_>,
expected
);
}
#[tokio::test]
#[traced_test]
async fn test_read_after_signing_error_causes_jump_to_modify_before_attempt_completion() {
let expected = r#""DispatchFailure(DispatchFailure { source: ConnectorError { kind: Other(None), so... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,041 | 1,100 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:28 | expected
);
}
#[tokio::test]
#[traced_test]
async fn test_read_after_transmit_error_causes_jump_to_modify_before_attempt_completion() {
let expected = r#""ResponseError(ResponseError { source: InterceptorError { kind: ModifyBeforeAttemptCompletion, interceptor_name: Some(\"DestinationIn... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,081 | 1,140 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:29 | &mut FinalizerInterceptorContextMut<'_>,
expected
);
}
#[tokio::test]
#[traced_test]
async fn test_read_after_deserialization_error_causes_jump_to_modify_before_attempt_completion()
{
let expected = r#""ResponseError(ResponseError { source: InterceptorError { kind: Modif... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,121 | 1,180 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:30 | &FinalizerInterceptorContextRef<'_>,
expected
);
}
#[tokio::test]
async fn test_stop_points() {
let runtime_plugins = || {
RuntimePlugins::new()
.with_operation_plugin(TestOperationRuntimePlugin::new())
.with_operation_plugin(NoAuthRun... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,161 | 1,220 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:31 | async fn test_stop_points_error_handling() {
#[derive(Debug, Default)]
struct Inner {
modify_before_retry_loop_called: AtomicBool,
modify_before_completion_called: AtomicBool,
read_after_execution_called: AtomicBool,
}
#[derive(Clone, Debug, Default)]
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,201 | 1,260 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:32 | fn read_after_execution(
&self,
_context: &FinalizerInterceptorContextRef<'_>,
_rc: &RuntimeComponents,
_cfg: &mut ConfigBag,
) -> Result<(), BoxError> {
self.inner
.read_after_execution_called
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,241 | 1,300 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:33 | "test",
"test",
Input::doesnt_matter(),
&runtime_plugins(),
StopPoint::BeforeTransmit,
)
.await
.expect("success");
assert!(context.response().is_none());
assert!(interceptor
.inner
.modify_before_retry_loop... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | b95f7d686040150eb38c68d209f7a6557a565cc3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b95f7d686040150eb38c68d209f7a6557a565cc3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,281 | 1,304 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:5 | }
.maybe_timeout(operation_timeout_config)
.await
}
.instrument(debug_span!("invoke", service = %service_name, operation = %operation_name))
.await
}
/// Apply configuration is responsible for apply runtime plugins to the config bag, as well as running
/// `read_before_execution` intercepto... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 161 | 220 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:6 | modify_before_serialization(ctx, runtime_components, cfg);
});
// Serialization
ctx.enter_serialization_phase();
{
let _span = debug_span!("serialization").entered();
let request_serializer = cfg
.load::<SharedRequestSerializer>()
.expect("request serializer must... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 201 | 260 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:7 | let should_attempt = runtime_components
.retry_strategy()
.should_attempt_initial_request(runtime_components, cfg);
match should_attempt {
// Yes, let's make a request
Ok(ShouldAttempt::Yes) => debug!("retry strategy has OKed initial request"),
// No, this request shouldn't b... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 241 | 300 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:8 | sleep.await;
}
let attempt_timeout_config =
MaybeTimeoutConfig::new(runtime_components, cfg, TimeoutKind::OperationAttempt);
trace!(attempt_timeout_config = ?attempt_timeout_config);
let maybe_timeout = async {
debug!("beginning attempt #{i}");
try_att... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 281 | 340 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:9 | }
}
#[instrument(skip_all, level = "debug")]
async fn try_attempt(
ctx: &mut InterceptorContext,
cfg: &mut ConfigBag,
runtime_components: &RuntimeComponents,
stop_point: StopPoint,
) {
run_interceptors!(halt_on_err: read_before_attempt(ctx, runtime_components, cfg));
halt_on_err!([ctx] => orch... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 321 | 380 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:10 | OrchestratorError::other("No HTTP client was available to send this request. \
Enable the `rustls` crate feature or configure a HTTP client to fix this.")
));
let timeout_config = cfg.load::<TimeoutConfig>().expect("timeout config must be set");
let settings = {
let m... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 361 | 420 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:11 | let _span = debug_span!("deserialize_nonstreaming").entered();
log_response_body(response, cfg);
response_deserializer.deserialize_nonstreaming(response)
}),
}
}
.instrument(debug_span!("deserialization"))
.await;
trace!(output_or_error = ?... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 401 | 460 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:12 | mod tests {
use super::*;
use crate::client::auth::no_auth::{NoAuthRuntimePlugin, NO_AUTH_SCHEME_ID};
use crate::client::orchestrator::endpoints::StaticUriEndpointResolver;
use crate::client::retries::strategy::NeverRetryStrategy;
use crate::client::test_util::{
deserializer::CannedResponseD... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 441 | 500 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:13 | }
fn new_response_deserializer() -> CannedResponseDeserializer {
CannedResponseDeserializer::new(
Response::builder()
.status(StatusCode::OK)
.body(SdkBody::empty())
.map_err(|err| OrchestratorError::other(Box::new(err)))
.map(Outp... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 481 | 540 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:14 | .with_endpoint_resolver(Some(SharedEndpointResolver::new(
StaticUriEndpointResolver::http_localhost(8080),
)))
.with_http_client(Some(http_client_fn(|_, _| {
OkConnector::new().into_shared()
})))
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 521 | 580 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:15 | #[derive(Debug)]
struct FailingInterceptorA;
impl Intercept for FailingInterceptorA {
fn name(&self) -> &'static str { "FailingInterceptorA" }
fn $interceptor(
&self,
_ctx: $ctx,
$($rc_arg)*
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 561 | 620 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:16 | $($rc_arg)*
_cfg: &mut ConfigBag,
) -> Result<(), BoxError> {
tracing::debug!("FailingInterceptorC called!");
Err("FailingInterceptorC".into())
}
}
#[derive(Debug)]
struct FailingInterceptors... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 601 | 660 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:17 | .with_client_plugin(FailingInterceptorsClientRuntimePlugin::new())
.with_operation_plugin(TestOperationRuntimePlugin::new())
.with_operation_plugin(NoAuthRuntimePlugin::new())
.with_operation_plugin(FailingInterceptorsOperationRuntimePlugin::new());
let actual... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 641 | 700 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:18 | async fn test_read_before_serialization_error_handling() {
let expected = r#""ConstructionFailure(ConstructionFailure { source: InterceptorError { kind: ReadBeforeSerialization, interceptor_name: Some(\"FailingInterceptorC\"), source: Some(\"FailingInterceptorC\") } })""#.to_string();
interceptor_error_... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 681 | 740 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:19 | }
#[tokio::test]
#[traced_test]
async fn test_modify_before_signing_error_handling() {
let expected = r#""DispatchFailure(DispatchFailure { source: ConnectorError { kind: Other(None), source: InterceptorError { kind: ModifyBeforeSigning, interceptor_name: Some(\"FailingInterceptorC\"), source: Some... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 721 | 780 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:20 | modify_before_transmit,
&mut BeforeTransmitInterceptorContextMut<'_>,
expected
);
}
#[tokio::test]
#[traced_test]
async fn test_read_before_transmit_error_handling() {
let expected = r#""DispatchFailure(DispatchFailure { source: ConnectorError { kind: Other(None)... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 761 | 820 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:21 | #[traced_test]
async fn test_read_before_deserialization_error_handling() {
let expected = r#""ResponseError(ResponseError { source: InterceptorError { kind: ReadBeforeDeserialization, interceptor_name: Some(\"FailingInterceptorC\"), source: Some(\"FailingInterceptorC\") }, raw: Response { status: 200, vers... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 801 | 860 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:22 | );
}
#[tokio::test]
#[traced_test]
async fn test_modify_before_completion_error_handling() {
let expected = r#""ResponseError(ResponseError { source: InterceptorError { kind: ModifyBeforeCompletion, interceptor_name: Some(\"FailingInterceptorC\"), source: Some(\"FailingInterceptorC\") }, raw: R... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 841 | 900 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:23 | _ctx: $origin_ctx,
$($rc_arg)*
_cfg: &mut ConfigBag,
) -> Result<(), BoxError> {
tracing::debug!("OriginInterceptor called!");
Err("OriginInterceptor".into())
}
}
#[derive(Debug)]
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 881 | 940 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:24 | }
let input = Input::doesnt_matter();
let runtime_plugins = RuntimePlugins::new()
.with_operation_plugin(TestOperationRuntimePlugin::new())
.with_operation_plugin(NoAuthRuntimePlugin::new())
.with_operation_plugin(InterceptorsTestOperationRuntimeP... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 921 | 980 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:25 | expected
);
}
#[tokio::test]
#[traced_test]
async fn test_read_before_serialization_error_causes_jump_to_modify_before_completion() {
let expected = r#""ConstructionFailure(ConstructionFailure { source: InterceptorError { kind: ModifyBeforeCompletion, interceptor_name: Some(\"Destinatio... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 961 | 1,020 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:26 | );
}
#[tokio::test]
#[traced_test]
async fn test_read_before_attempt_error_causes_jump_to_modify_before_attempt_completion() {
let expected = r#""DispatchFailure(DispatchFailure { source: ConnectorError { kind: Other(None), source: InterceptorError { kind: ModifyBeforeAttemptCompletion, interce... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,001 | 1,060 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:27 | }
#[tokio::test]
#[traced_test]
async fn test_read_after_signing_error_causes_jump_to_modify_before_attempt_completion() {
let expected = r#""DispatchFailure(DispatchFailure { source: ConnectorError { kind: Other(None), source: InterceptorError { kind: ModifyBeforeAttemptCompletion, interceptor_nam... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,041 | 1,100 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:28 | #[tokio::test]
#[traced_test]
async fn test_read_after_transmit_error_causes_jump_to_modify_before_attempt_completion() {
let expected = r#""ResponseError(ResponseError { source: InterceptorError { kind: ModifyBeforeAttemptCompletion, interceptor_name: Some(\"DestinationInterceptor\"), source: Some(\"De... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,081 | 1,140 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:29 | }
#[tokio::test]
#[traced_test]
async fn test_read_after_deserialization_error_causes_jump_to_modify_before_attempt_completion()
{
let expected = r#""ResponseError(ResponseError { source: InterceptorError { kind: ModifyBeforeAttemptCompletion, interceptor_name: Some(\"DestinationInterceptor\"),... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,121 | 1,180 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:30 | }
#[tokio::test]
async fn test_stop_points() {
let runtime_plugins = || {
RuntimePlugins::new()
.with_operation_plugin(TestOperationRuntimePlugin::new())
.with_operation_plugin(NoAuthRuntimePlugin::new())
};
// StopPoint::None should result i... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,161 | 1,220 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:31 | modify_before_retry_loop_called: AtomicBool,
modify_before_completion_called: AtomicBool,
read_after_execution_called: AtomicBool,
}
#[derive(Clone, Debug, Default)]
struct TestInterceptor {
inner: Arc<Inner>,
}
impl Intercept for TestIntercep... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,201 | 1,260 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:32 | _context: &FinalizerInterceptorContextRef<'_>,
_rc: &RuntimeComponents,
_cfg: &mut ConfigBag,
) -> Result<(), BoxError> {
self.inner
.read_after_execution_called
.store(true, Ordering::Relaxed);
Ok(())
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,241 | 1,300 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:33 | &runtime_plugins(),
StopPoint::BeforeTransmit,
)
.await
.expect("success");
assert!(context.response().is_none());
assert!(interceptor
.inner
.modify_before_retry_loop_called
.load(Ordering::Relaxed));
assert!(interceptor
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,281 | 1,301 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
// TODO(msrvUpgrade): This can be removed once we upgrade the MSRV to Rust 1.69
#![allow(unknown_lints)]
use self::auth::orchestrate_auth;
use crate::client::interceptors::Interceptors;
use crate::clien... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 280e400ab518efd8db7992921dc5345d9d67dac5 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/280e400ab518efd8db7992921dc5345d9d67dac5/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
// TODO(msrvUpgrade): This can be removed once we upgrade the MSRV to Rust 1.69
#![allow(unknown_lints)]
use self::auth::orchestrate_auth;
use crate::client::interceptors::Interceptors;
use crate::clien... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 55aa7275a4a080ca6c3b74b77d5f86d37dbb7720 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/55aa7275a4a080ca6c3b74b77d5f86d37dbb7720/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:11 | let _span = debug_span!("deserialize_nonstreaming").entered();
log_response_body(response, cfg);
response_deserializer.deserialize_nonstreaming(response)
}),
}
}
.instrument(debug_span!("deserialization"))
.await;
trace!(output_or_error = ?... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 55aa7275a4a080ca6c3b74b77d5f86d37dbb7720 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/55aa7275a4a080ca6c3b74b77d5f86d37dbb7720/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 401 | 460 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:12 | mod tests {
use super::*;
use crate::client::auth::no_auth::{NoAuthRuntimePlugin, NO_AUTH_SCHEME_ID};
use crate::client::orchestrator::endpoints::StaticUriEndpointResolver;
use crate::client::retries::strategy::NeverRetryStrategy;
use crate::client::test_util::{
deserializer::CannedResponseD... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 55aa7275a4a080ca6c3b74b77d5f86d37dbb7720 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/55aa7275a4a080ca6c3b74b77d5f86d37dbb7720/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 441 | 500 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:13 | Request::builder()
.body(SdkBody::empty())
.expect("request is valid"),
)
}
fn new_response_deserializer() -> CannedResponseDeserializer {
CannedResponseDeserializer::new(
Response::builder()
.status(StatusCode::OK)
.bo... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 55aa7275a4a080ca6c3b74b77d5f86d37dbb7720 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/55aa7275a4a080ca6c3b74b77d5f86d37dbb7720/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 481 | 540 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.