isle icon indicating copy to clipboard operation
isle copied to clipboard

Allow parallel integration tests

Open cremor opened this issue 1 year ago • 2 comments

This issue is very similar to #3 As explained there, you have to call IsleConfiguration.Reset() to get ASP.NET Core integration tests with ISLE to work. But this only helps as long as you execute all integration tests sequentially. If you want to execute them in parallel then you'll again get "Isle has already been configured" exceptions because multiple IsleConfiguration.Configure calls may happen between the IsleConfiguration.Reset() calls.

Please make it possible to run parallel ASP.NET Core integration tests with ISLE.

cremor avatar Sep 17 '23 15:09 cremor

I'm running into the same issue. Using this very dirty workaround

if (Environment.GetEnvironmentVariable("APPLICATION_INTEGRATION_TEST") is not "true") 
    IsleConfiguration.Configure(_ => {});

bbartels avatar Jan 31 '24 12:01 bbartels

On further thought, I just ended up calling it from a static constructor. Should work in both normal application runtime and in integration test scenarios

bbartels avatar Jan 31 '24 17:01 bbartels