Skip to content

Commit cf79fab

Browse files
rcohysaito1001
authored andcommitted
[smithy-rs] Fix flaky test in aws-sigv4 (#3990)
## Motivation and Context The test was flaky because all invalid headers are counted as rejects which can in rare cases exceed the maximum number of failures. The test was flaky because all invalid headers are counted as rejects which can in rare cases exceed the maximum number of failures. ## Description Change the test to assert that the validity status matches instead of filtering those cases out ## Testing - cargo test ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ Co-authored-by: ysaito1001 <[email protected]>
1 parent 96dacd2 commit cf79fab

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

sdk/aws-sigv4/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ optional = true
107107
bytes = "1"
108108
hex-literal = "0.4.1"
109109
httparse = "1.8"
110-
libfuzzer-sys = "=0.4.7"
111110
pretty_assertions = "1.3"
112111
proptest = "1.2"
113112
serde = "1.0.180"

sdk/aws-sigv4/src/http_request/canonical_request.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,8 +1032,7 @@ mod tests {
10321032

10331033
#[test]
10341034
fn test_normalize_header_value_works_on_valid_header_value(v in (".*")) {
1035-
prop_assume!(HeaderValue::from_str(&v).is_ok());
1036-
assert!(normalize_header_value(&v).is_ok());
1035+
assert_eq!(normalize_header_value(&v).is_ok(), HeaderValue::from_str(&v).is_ok());
10371036
}
10381037

10391038
#[test]

versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
smithy_rs_revision = 'c0b5ee389a0dde1759d7d130e6f2d1d110c4b895'
1+
smithy_rs_revision = '587e714f9051a4d834a329646a4a709a32affc36'
22
aws_doc_sdk_examples_revision = '9cd7f3841f9e6ba950edbf265b251b811db357fc'
33

44
[manual_interventions]
@@ -2458,7 +2458,7 @@ source_hash = 'b748a6dfc4629c516cbb0ef8338767426913e055e2cebff9f112c4df7533f2d2'
24582458
[crates.aws-sigv4]
24592459
category = 'AwsRuntime'
24602460
version = '1.2.8'
2461-
source_hash = '1935d6b62a1f2547e818482d06a561e3bd55d9b2afd00aad53e1c46cebcdbb91'
2461+
source_hash = '5449ae76891e06f639a6f86b677deffae3b43b9c6bafc70eebee05b0b643bfd0'
24622462

24632463
[crates.aws-smithy-async]
24642464
category = 'SmithyRuntime'

0 commit comments

Comments
 (0)