Skip to content

test: prevent binding to the same port in parallel with -threaded#73

Open
sternenseemann wants to merge 1 commit intolpeterse:masterfrom
sternenseemann:test-threaded-in-order
Open

test: prevent binding to the same port in parallel with -threaded#73
sternenseemann wants to merge 1 commit intolpeterse:masterfrom
sternenseemann:test-threaded-in-order

Conversation

@sternenseemann
Copy link
Copy Markdown
Contributor

tasty-1.5.4 1 will execute test cases in parallel when built with -threaded. Since the test suite reuses the same ports constantly, but needs to test e.g. cancel behavior with multiple threads, we need to make sure that we don't try to bind to the same port in parallel. This commit implements the simplest fix for this, by simply adding inOrderTestGroup where necessary.

@Bodigrim
Copy link
Copy Markdown

Since you use inOrderTestGroup, it's better to restrict build-depends: tasty >= 1.5.4, it's a fairly new addition.

@sternenseemann sternenseemann force-pushed the test-threaded-in-order branch from 47d05b4 to 0964a66 Compare March 29, 2026 12:49
@sternenseemann
Copy link
Copy Markdown
Contributor Author

@Bodigrim right, thanks! Just added some CPP now.

tasty-1.5.4 [1] will execute test cases in parallel when built with
-threaded. Since the test suite reuses the same ports constantly,
but needs to test e.g. cancel behavior with multiple threads, we
need to make sure that we don't try to bind to the same port in
parallel. This commit implements the simplest fix for this, by simply
adding inOrderTestGroup where necessary.

[1]: https://hackage.haskell.org/package/tasty-1.5.4/changelog
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