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

cfg.Cache(x =>

                // This is more stable on unit test

                // 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:

                // x.Provider<NHibernate.Caches.SysCache.SysCacheProvider>();                    

No comments:

Post a Comment