Skip to content

Commit

Permalink
Update nativeBuildTools and junit version
Browse files Browse the repository at this point in the history
  • Loading branch information
linghengqian committed Jan 10, 2023
1 parent 6f3eb79 commit 0bec2c9
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 64 deletions.
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[versions]
# Project versions
nativeBuildTools = "0.9.16"
nativeBuildTools = "0.9.19"

# External dependencies
junitPlatform = "1.8.1"
junitJupiter = "5.8.1"
junitPlatform = "1.9.1"
junitJupiter = "5.9.1"
groovy = "3.0.8"

[libraries]
Expand Down
4 changes: 0 additions & 4 deletions tests/src/com.hazelcast/hazelcast/5.2.1/build.gradle
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
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();
}
}

This file was deleted.

0 comments on commit 0bec2c9

Please sign in to comment.