Closed DiscoPYF closed 11 months ago
I added the parameter on HttpApiTransport
and created a unit test to make sure the parameter works as expected.
I am encountering a weird behavior with XUnit. As soon as I add a new test method, the Dispose()
method of ApiClientTestFixtureBase
is called in the middle of the test run before all tests in HttpApiTransportTest
finished running.
Can anyone reproduce this? FYI @rossmills99
For example, on latest master, I add a new test method MyNewTest
. See screenshots below:
Before adding the new test method:
After adding the new test method:
Skipping the test method still cause errors:
I tried updating the XUnit package to latest version, same issue.
I can reproduce your results. The issue goes away if I make the signature of the new method async Task
instead of void
.
Thanks @rossmills99 !
I still get the issue on my machine even when all tests methods are async Task
. 🤔
I opened a pull request and the CI builds work fine, so it should be good?
From discussion on #457
We propose to add a boolean parameter to
ArangoDBClient
/HttpApiTransport
constructors that controls whether the provided instances of transport/HTTP client are disposed when the holding instance is disposed.The default value of the new boolean parameter must preserve the current behavior (dispose instances) to avoid a breaking change for consumers.