Skip to content

[Event Grid] Headerless Matcher to not check the dynamic headers#20345

Merged
HarshaNalluru merged 1 commit intoAzure:mainfrom
HarshaNalluru:harshan/issue/20343
Feb 11, 2022
Merged

[Event Grid] Headerless Matcher to not check the dynamic headers#20345
HarshaNalluru merged 1 commit intoAzure:mainfrom
HarshaNalluru:harshan/issue/20343

Conversation

@HarshaNalluru
Copy link
Copy Markdown
Contributor

@HarshaNalluru HarshaNalluru commented Feb 11, 2022

Fixes #20343

[browser-tests]     #send (CloudEvent schema)
[browser-tests]       × sends a single event
[browser-tests]         Chrome Headless 93.0.4577.0 (Windows 10)
[browser-tests]       RestError: {"Message":"Unable to find a record for the request POST https://endpoint/api/events?api-version=2018-01-01\r\nHeader differences:\r\n    \u003CContent-Type\u003E values differ, request \u003Capplication/cloudevents-batch\u002Bjson; charset=utf-8\u003E, record \u003Capplication/cloudevents-batch\u002Bjson; charset=UTF-8\u003E\r\nBody differences:\r\n","Status":"NotFound"}
[browser-tests]           at handleErrorResponse$2 (../../core/core-client/src/deserializationPolicy.ts:254:15 <- dist-test/index.browser.js:18197:20)
[browser-tests]           at deserializeResponseBody$2 (../../core/core-client/src/deserializationPolicy.ts:166:4 <- dist-test/index.browser.js:18132:46)

// DIFF
request \u003Capplication/cloudevents-batch\u002Bjson; charset=utf-8\u003E, 
record \u003Capplication/cloudevents-batch\u002Bjson; charset=UTF-8\u003E

Headerless matcher doesn't match the headers in playback.
This should make the CI green.

@ghost ghost added the Event Grid label Feb 11, 2022
@HarshaNalluru HarshaNalluru requested a review from scbedd February 11, 2022 20:42
Copy link
Copy Markdown
Member

@ellismg ellismg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me. I don't fully understand why the casing differs between the recordings and playback and to be honest I'm slightly confused as to why the uppercase UTF-8 appears in the recordings given that it seems we should be sending the lowercase version given the generated code. But I see how this would fix the issue and I agree the header matching is uninteresting for these test cases.

@HarshaNalluru
Copy link
Copy Markdown
Contributor Author

I'm unsure as well about what caused the change.
Previously, the test had the same headers, and my tests migration PR succeeded with playback for the browser test.

@HarshaNalluru HarshaNalluru merged commit 5e6df44 into Azure:main Feb 11, 2022
@HarshaNalluru HarshaNalluru deleted the harshan/issue/20343 branch February 11, 2022 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Test][EventGrid] browser playback tests failing

2 participants