Skip to content

Commit 9685913

Browse files
committed
Use com.hazelcast:hazelcast:5.2.0 instead of com.hazelcast:hazelcast:5.2.1
1 parent 6f3eb79 commit 9685913

File tree

24 files changed

+25
-67
lines changed

24 files changed

+25
-67
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[
22
{
33
"latest": true,
4-
"metadata-version": "5.2.1",
4+
"metadata-version": "5.2.0",
55
"module": "com.hazelcast:hazelcast",
66
"tested-versions": [
7-
"5.2.1"
7+
"5.2.0"
88
]
99
}
1010
]

tests/src/com.hazelcast/hazelcast/5.2.1/build.gradle renamed to tests/src/com.hazelcast/hazelcast/5.2.0/build.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ dependencies {
1717
testImplementation 'javax.cache:cache-api:1.1.1'
1818
}
1919

20-
test {
21-
jvmArgs = Arrays.asList("-Xmx4g")
22-
}
23-
2420
graalvmNative {
2521
agent {
2622
defaultMode = "conditional"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
library.version = 5.2.0
2+
metadata.dir = com.hazelcast/hazelcast/5.2.0/
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@
3535
import javax.cache.Cache;
3636
import javax.cache.CacheManager;
3737
import javax.cache.Caching;
38+
import javax.cache.configuration.CompleteConfiguration;
3839
import javax.cache.configuration.MutableConfiguration;
3940
import javax.cache.expiry.AccessedExpiryPolicy;
4041
import javax.cache.expiry.Duration;
42+
import javax.cache.spi.CachingProvider;
4143
import java.util.Collection;
4244
import java.util.List;
4345
import java.util.Set;
@@ -256,4 +258,21 @@ void testTopic() {
256258
IntStream.range(0, 3).mapToObj(i -> "Hello to distributed world").forEach(topic::publish);
257259
client.shutdown();
258260
}
261+
262+
@Test
263+
void testJCacheOrigin() {
264+
CachingProvider cachingProvider = Caching.getCachingProvider(HazelcastCachingProvider.class.getName());
265+
CacheManager cacheManager = cachingProvider.getCacheManager();
266+
CompleteConfiguration<String, String> config = new MutableConfiguration<String, String>()
267+
.setTypes(String.class, String.class)
268+
.setStatisticsEnabled(true)
269+
.setReadThrough(false)
270+
.setManagementEnabled(true)
271+
.setStoreByValue(false)
272+
.setWriteThrough(false);
273+
Cache<String, String> cache = cacheManager.createCache("example", config);
274+
cache.put("world", "Hello World");
275+
assertThat(cache.get("world")).isEqualTo("Hello World");
276+
assertThat(cacheManager.getCache("example", String.class, String.class)).isNotNull();
277+
}
259278
}

0 commit comments

Comments
 (0)