Open vedion opened 1 year ago
Hi Anders, Thanks for reporting this, it isn't something I'd considered before now.
I wonder if we should also retry failures creating the fixture, that way a transient failure in the fixture creation would also be retried. I haven't yet looked into whether that would be possible, but would that work for your use-case?
Hi,
Thank you for the response. Yes, that would also work for my use-case :)
Hi,
I have a case where an exception is thrown when initializing my fixture used in ICollectionFixture, ex:
I the above example MyFixture.InitializeAsync will be only be called once and the code in test "When_X_Then_Y" will be hit twice.
Would it be possible to look at "TestCollectionStarting" and "TestCollectionFinished" in MessageTransformer so the tests are not retried if the test failed between state "TestCollectionStarting" and "TestCollectionFinished": https://github.com/xamarin/xunit/blob/master/src/xunit.execution/Sdk/Frameworks/Runners/TestCollectionRunner.cs
With the current code the exception in the fixture is hidden.
Best Regards, Anders Havn