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

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -