close cache instances properly
This commit is contained in:
parent
4647e1b10e
commit
58aae2a09d
@ -9,6 +9,7 @@ import javax.cache.configuration.FactoryBuilder;
|
|||||||
import javax.cache.configuration.MutableConfiguration;
|
import javax.cache.configuration.MutableConfiguration;
|
||||||
import javax.cache.spi.CachingProvider;
|
import javax.cache.spi.CachingProvider;
|
||||||
|
|
||||||
|
import org.junit.After;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
@ -32,4 +33,9 @@ public class CacheLoaderTest {
|
|||||||
assertEquals("fromCache" + i, value);
|
assertEquals("fromCache" + i, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@After
|
||||||
|
public void closeCache() {
|
||||||
|
cache.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import javax.cache.Caching;
|
|||||||
import javax.cache.configuration.MutableConfiguration;
|
import javax.cache.configuration.MutableConfiguration;
|
||||||
import javax.cache.spi.CachingProvider;
|
import javax.cache.spi.CachingProvider;
|
||||||
|
|
||||||
|
import org.junit.After;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
@ -29,4 +30,9 @@ public class EntryProcessorTest {
|
|||||||
this.cache.invoke("key", new SimpleEntryProcessor());
|
this.cache.invoke("key", new SimpleEntryProcessor());
|
||||||
assertEquals("value - modified", cache.get("key"));
|
assertEquals("value - modified", cache.get("key"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@After
|
||||||
|
public void closeCache() {
|
||||||
|
cache.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ import javax.cache.configuration.MutableCacheEntryListenerConfiguration;
|
|||||||
import javax.cache.configuration.MutableConfiguration;
|
import javax.cache.configuration.MutableConfiguration;
|
||||||
import javax.cache.spi.CachingProvider;
|
import javax.cache.spi.CachingProvider;
|
||||||
|
|
||||||
|
import org.junit.After;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
@ -43,4 +44,9 @@ public class EventListenerTest {
|
|||||||
assertEquals(true, this.listener.getUpdated());
|
assertEquals(true, this.listener.getUpdated());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@After
|
||||||
|
public void closeCache() {
|
||||||
|
cache.close();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user