You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@gojanpaolo I was able to reproduce this. The issue is that xunit (or the runner) is creating a new app domain for each test collection. This can be good for isolation, but does defeat EF caching. I believe that there are options to turn of this behavior in xunit, so that might be cleaner than what you have above. Also, when running on .NET Core there are no app domains, so xunit will never have this behavior there. (Unless they simulate it with multiple processes or something like that.) Closing as there is no EF actionable issue here.
See #1906 (comment)
Here are the test results that I got.
The
CacheTestClassXXX
classes use a simplified version of the work around described in #1906 (comment).Notice that only
CacheTestClass1
had the overhead ofDbContext
model creation.But the
TestClassXXX
classes all had the overhead.Steps to reproduce
Dependencies
microsoft.entityframeworkcore.sqlite v2.0.2
xunit v2.3.1
xunit.runner.visualstuio v2.3.1
Further technical details
.NET Framework 4.6.1
VS 2017 15.6.1
Windows 7
cc: @ajcvickers
The text was updated successfully, but these errors were encountered: