-
Notifications
You must be signed in to change notification settings - Fork 32
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
STA for Fixture Collections #52
Comments
Maybe. I'm not sure if xunit gives an individual test attribute like Maybe the better approach is for your fixture to not initialize itself, but rather leave it to the first test to call into it (from the STA) and then it can lazily initialize. |
This is a issue to me too. I have some heavy initialization in the fixture collection that must be run on the same STA thread as all tests. One solution is to make an API available to let the fixture collection to schedule code in the STA thread created for [StaFact] |
Each |
#54 tracks a similar requirement. So we might devise something clever here. |
If you mark a test class as a [Collection()] all StaFact tests seem to run on the same thread. But when trying to use multiple classes with the same Collection name to share a fixture, the collection Fixture isn't constructed inside an StaThread. |
Bring back access tokens for AzP feed access
I tried to put some intialization code in a fixture collection and it is crashing because it is not STA.
Could it be possible to have fixture collection constructor and dispose on STA?
Thanks
The text was updated successfully, but these errors were encountered: