-
Notifications
You must be signed in to change notification settings - Fork 31
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
StaFact facts breaks the concurrency limitations of Xunit #53
Comments
We occasionally see our tests fails or even hang on our build servers which is mentioned in one of those threads. Have you seen this as well? |
Yes, they have been failed if they rely on timing (assertion of execution time). |
Thanks for reporting. Any idea how we would fix this? I have no experience with the xunit parallel execution throttle. The xunit methods are mostly async, so it seems designed that tests not always block a thread, so if xunit's throttling assumes the test blocks a thread, that already seems broken without UIFact's help. Can you repro this problem with any |
I think it should be ok to block the xunit thread while UIFact thread (and all other thread in this extension) is executing. Synchronous thread will "block" the thread too.
I could not really understand your question. |
I am trying to establish how xunit throttles test runs when tests are asynchronous. Because whatever that mechanism is, we should reuse it for UIFact. |
Xunit starts as many threads as tests should be in parallel. All testing work is distributed to these worker threads. With the additional threads of StaFact the mechanism cannot be reused, I guess. Maybe @xunit can help? |
@AArnott , when do you plan to create a new release with this issue fixed? |
I'll try to get it out later today. |
This is now available as https://github.com/AArnott/Xunit.StaFact/releases/tag/v1.1.5-alpha |
Hey @AArnott, could you please create a new public release? |
We found another issue... :( |
Xunit has an internally implemented limitation of tests to be executed concurrently. This is implemented based on fixed number of threads executing the tests.
All
Fact
implementations of StaFact packages creating its own thread, e.g.UIFact
, will break the Xunit limitation because the Xunit thread is released after UIFact test execution has been started. I think this causes unexpected high CPU load while test execution resulting in accidental failed test execution, e.g. fluentassertions/fluentassertions#1391 and https://ci.appveyor.com/project/dennisdoomen/fluentassertions/builds/37160306I've created and attached a sample project showing the problem. For demonstration I've configured the limitation to 2 concurrent tests. All standard
Fact
tests completing successfully. MostUIFact
tests will fail because the maximum number of tests is exceeded.StaFactTests.zip
The text was updated successfully, but these errors were encountered: