Skip to content

Commit 587e714

Browse files
rcohysaito1001
andauthored
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 <awsaito@amazon.com>
1 parent c0b5ee3 commit 587e714

File tree

3 files changed

+1
-27
lines changed

3 files changed

+1
-27
lines changed

aws/rust-runtime/Cargo.lock

Lines changed: 0 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

aws/rust-runtime/aws-sigv4/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ aws-smithy-runtime-api = { path = "../../../rust-runtime/aws-smithy-runtime-api"
4545
bytes = "1"
4646
hex-literal = "0.4.1"
4747
httparse = "1.8"
48-
# Version pinned due to https://github.com/rust-fuzz/libfuzzer/issues/126
49-
libfuzzer-sys = "=0.4.7"
5048
pretty_assertions = "1.3"
5149
proptest = "1.2"
5250
serde = "1.0.180"

aws/rust-runtime/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]

0 commit comments

Comments
 (0)