cfg.Cache(x =>
{
// This is more stable on unit test
x.Provider<NHibernate.Cache.HashtableCacheProvider>();
// I don't know why SysCacheProvider has problem on simultaneous unit testing,
// might be SysCacheProvider is just giving one session factory, so simultaneous test see each other caches
// This solution doesn't work: http://stackoverflow.com/questions/700043/mstest-executing-all-my-tests-simultaneously-breaks-tests-what-to-do
// x.Provider<NHibernate.Caches.SysCache.SysCacheProvider>();
"Simplicity can't be bought later, it must be earned from the start" -- DB
Sunday, September 7, 2014
Unit Testing NHibernate Caching
I read somewher that says HashtableCacheProvider is more ok on unit testing, somehow true, have to use it for unit testing for now
Labels:
NHibernate
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment