Commit 2c963d0
authored
Log actual recorded events on panic in
## Motivation and Context
We've had flaky tests in our release pipeline. The pain points are that
reproducing these failures is difficult and that when a test does fail,
`panic` from the `match_events!` macro does not provide visibility into
the actual recorded events.
This PR does not address the underlying test failures but aims to
improve visibility into the actual recorded events when a test fails.
This will help us better diagnose and troubleshoot flaky tests.
Here is the new diagnostic message looks like (deliberately made a test
fail just to show what the message looks like):
```
expected `ev!(connect)` but got Response(HttpResponse { status: 429, body: b"{\"__type\":\"com.amazonaws.dynamodb.v20120810#ThrottlingException\",\n\"message\":\"enhance your calm\"}" })
actual recorded events: [DnsLookup("this-url-is-converted-to-localhost.com"), NewConnection, Response(HttpResponse { status: 429, body: b"{\"__type\":\"com.amazonaws.dynamodb.v20120810#ThrottlingException\",\n\"message\":\"enhance your calm\"}" }), Response(HttpResponse { status: 200, body: b"{\"Count\":0,\"Items\":[],\"ScannedCount\":2}" })]
```
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._match_events! (#4069)1 parent 7f10206 commit 2c963d0
File tree
3 files changed
+8
-3
lines changed- rust-runtime
- aws-smithy-http-client
- src/test_util
3 files changed
+8
-3
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
84 | 89 | | |
85 | 90 | | |
86 | 91 | | |
| |||
0 commit comments