hibernate - Spring 3.2 disable @Cacheable during unit tests -


i'm facing problem unit tests. use ehcache whith spring 3.2 (@cacheable) works disable cache during unit tests.

so in src/test/resources/ehcache.xml wrote :

<cache name="mycache"        maxelementsinmemory="1"        eternal="false"        timetoidleseconds="0"        timetoliveseconds="0"        overflowtodisk="true"        maxelementsondisk="0"        diskpersistent="false"        diskexpirythreadintervalseconds="0"        memorystoreevictionpolicy="lru"/> 

but cache still working ! has idea ?

thanks in advance help!

spring profile done purpose. see documentation here, here.

define profile "test" in cache manager bean (<bean profile="test" ... />) or upper , activate or not profile annotation @activeprofiles("test").

if problem persists, verify context defines cache root context.


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -