Skip to content

TestFoundation: stop internal http server on test case tear down #2958

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 23, 2020

Conversation

lxbndr
Copy link
Contributor

@lxbndr lxbndr commented Dec 22, 2020

Leaving server running consumes one thread from Dispatch global thread pool per one started LoopbackServerTest. There are 5 such test cases at the moment.

On non-Darwin platforms thread pool size is extremely small (equals to the number of CPU cores), and TestFoundation test suite quickly becomes unstable on some machines (e.g. cloud VMs with 2-core CPUs).

This has no significant impact on current CMake-generated tests, as they are started as separate process each, but trying to run whole TestFoundation suite would hang or fail some trivial tests just because global queue is stuck.

Leaving server running consumes one thread from Dispatch global thread pool per
one started LoopbackServerTest. There are 5 such test cases at the moment.

On non-Darwin platforms thread pool size is extremely small (equals to the number
of CPU cores), and TestFoundation test case quickly becomes unstable on some
machines (e.g. cloud VMs with 2-core CPUs).
@compnerd
Copy link
Member

@swift-ci please test

@spevans
Copy link
Contributor

spevans commented Dec 23, 2020

Note that the TestURLSession tests are actually disabled in CI but I tested this locally on linux and against native foundation and it passed.

@spevans spevans merged commit 4d6d491 into swiftlang:main Dec 23, 2020
@lxbndr lxbndr deleted the stop-http-server branch December 23, 2020 08:09
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.

3 participants