@Ignore @Test public void testWithHazelcastConfiguration() throws Exception { // wrong use!! ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); URI uri = classLoader.getResource("hazelcast-jcache.xml").toURI(); try (CachingProvider provider = Caching.getCachingProvider(); CacheManager manager = provider.getCacheManager(uri, classLoader); Cache<String, String> cache = manager.getCache("testCache")) { cache.put("key1", "value1"); cache.put("key2", "value2"); TimeUnit.SECONDS.sleep(1); cache.get("key2"); TimeUnit.SECONDS.sleep(2); assertThat(cache.get("key1")).isNull(); assertThat(cache.get("key2")).isEqualTo("value2"); } }
@Before public void init() { InputStream stream = ClassLoader.getSystemResourceAsStream("testLuceneIndex.sql"); db.command(new OCommandScript("sql", getScriptFromStream(stream))).execute(); }