Skip to content

Race condition handling on httplistener in unit tests#352

Merged
jskeet merged 1 commit intocloudevents:mainfrom
erwinkramer:feature/racecond
May 6, 2026
Merged

Race condition handling on httplistener in unit tests#352
jskeet merged 1 commit intocloudevents:mainfrom
erwinkramer:feature/racecond

Conversation

@erwinkramer
Copy link
Copy Markdown
Contributor

As we see here https://github.com/cloudevents/sdk-csharp/actions/runs/25399467082/job/74494893548?pr=351#step:4:102, this looks like a pretty rare race condition.

This PR catches the HttpListenerException and tries a few more times with a new random port. That hopefully should solve it.

Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Erwin <erwinkramer@hotmail.com>
Copy link
Copy Markdown
Contributor

@jskeet jskeet left a comment

Choose a reason for hiding this comment

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

Great, thanks :)

@jskeet jskeet merged commit 19a637e into cloudevents:main May 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants