Skip to content

Commit

Permalink
Use com.hazelcast:hazelcast:5.2.0 instead of com.hazelcast:hazelcast:…
Browse files Browse the repository at this point in the history
…5.2.1
  • Loading branch information
linghengqian committed Jan 10, 2023
1 parent 6f3eb79 commit 9685913
Show file tree
Hide file tree
Showing 24 changed files with 25 additions and 67 deletions.
4 changes: 2 additions & 2 deletions metadata/com.hazelcast/hazelcast/index.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[
{
"latest": true,
"metadata-version": "5.2.1",
"metadata-version": "5.2.0",
"module": "com.hazelcast:hazelcast",
"tested-versions": [
"5.2.1"
"5.2.0"
]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ dependencies {
testImplementation 'javax.cache:cache-api:1.1.1'
}

test {
jvmArgs = Arrays.asList("-Xmx4g")
}

graalvmNative {
agent {
defaultMode = "conditional"
Expand Down
2 changes: 2 additions & 0 deletions tests/src/com.hazelcast/hazelcast/5.2.0/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
library.version = 5.2.0
metadata.dir = com.hazelcast/hazelcast/5.2.0/
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@
import javax.cache.Cache;
import javax.cache.CacheManager;
import javax.cache.Caching;
import javax.cache.configuration.CompleteConfiguration;
import javax.cache.configuration.MutableConfiguration;
import javax.cache.expiry.AccessedExpiryPolicy;
import javax.cache.expiry.Duration;
import javax.cache.spi.CachingProvider;
import java.util.Collection;
import java.util.List;
import java.util.Set;
Expand Down Expand Up @@ -256,4 +258,21 @@ void testTopic() {
IntStream.range(0, 3).mapToObj(i -> "Hello to distributed world").forEach(topic::publish);
client.shutdown();
}

@Test
void testJCacheOrigin() {
CachingProvider cachingProvider = Caching.getCachingProvider(HazelcastCachingProvider.class.getName());
CacheManager cacheManager = cachingProvider.getCacheManager();
CompleteConfiguration<String, String> config = new MutableConfiguration<String, String>()
.setTypes(String.class, String.class)
.setStatisticsEnabled(true)
.setReadThrough(false)
.setManagementEnabled(true)
.setStoreByValue(false)
.setWriteThrough(false);
Cache<String, String> cache = cacheManager.createCache("example", config);
cache.put("world", "Hello World");
assertThat(cache.get("world")).isEqualTo("Hello World");
assertThat(cacheManager.getCache("example", String.class, String.class)).isNotNull();
}
}
2 changes: 0 additions & 2 deletions tests/src/com.hazelcast/hazelcast/5.2.1/gradle.properties

This file was deleted.

This file was deleted.

4 changes: 2 additions & 2 deletions tests/src/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,12 @@
]
},
{
"test-project-path": "com.hazelcast/hazelcast/5.2.1",
"test-project-path": "com.hazelcast/hazelcast/5.2.0",
"libraries": [
{
"name": "com.hazelcast:hazelcast",
"versions": [
"5.2.1"
"5.2.0"
]
}
]
Expand Down

0 comments on commit 9685913

Please sign in to comment.