From ebb13205061df89ed12f220b9f347db60068bb94 Mon Sep 17 00:00:00 2001 From: Reinhard Prechtl Date: Fri, 22 Dec 2017 15:02:01 +0100 Subject: [PATCH] Update the Infinispan client to the latest version --- pom.xml | 2 +- ...Infinispan90xContainerIntegrationTest.java | 24 +++++++++++++++++++ ...nfinispan91xContainerIntegrationTest.java} | 2 +- .../resources/infinispan-90x-standalone.xml | 0 4 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 src/test/java/Infinispan90xContainerIntegrationTest.java rename src/test/java/{InfinispanContainerIntegrationTest.java => Infinispan91xContainerIntegrationTest.java} (93%) create mode 100644 src/test/resources/infinispan-90x-standalone.xml diff --git a/pom.xml b/pom.xml index 44d4655..48decd4 100644 --- a/pom.xml +++ b/pom.xml @@ -17,7 +17,7 @@ 1.5.0 - 9.1.3.Final + 9.1.4.Final diff --git a/src/test/java/Infinispan90xContainerIntegrationTest.java b/src/test/java/Infinispan90xContainerIntegrationTest.java new file mode 100644 index 0000000..734d81c --- /dev/null +++ b/src/test/java/Infinispan90xContainerIntegrationTest.java @@ -0,0 +1,24 @@ +import de.rpr.testcontainers.infinispan.InfinispanContainer; +import org.infinispan.client.hotrod.ProtocolVersion; +import org.junit.ClassRule; +import org.junit.Test; + +import static org.junit.Assert.assertNotNull; + +public class Infinispan91xContainerIntegrationTest { + + @ClassRule + public static InfinispanContainer infinispan = new InfinispanContainer("jboss/infinispan-server:9.1.4.Final") + .withProtocolVersion(ProtocolVersion.PROTOCOL_VERSION_26) + .withCaches("testCache"); + + @Test + public void rule_should_have_mapped_hotrod_port() { + assertNotNull(infinispan.getMappedPort(11222)); + } + + @Test + public void should_get_existing_cache() { + assertNotNull(infinispan.getCacheManager().getCache("testCache")); + } +} diff --git a/src/test/java/InfinispanContainerIntegrationTest.java b/src/test/java/Infinispan91xContainerIntegrationTest.java similarity index 93% rename from src/test/java/InfinispanContainerIntegrationTest.java rename to src/test/java/Infinispan91xContainerIntegrationTest.java index db51df1..eb239ef 100644 --- a/src/test/java/InfinispanContainerIntegrationTest.java +++ b/src/test/java/Infinispan91xContainerIntegrationTest.java @@ -8,7 +8,7 @@ import static org.junit.Assert.assertNotNull; public class InfinispanContainerIntegrationTest { @ClassRule - public static InfinispanContainer infinispan = new InfinispanContainer() + public static InfinispanContainer infinispan = new InfinispanContainer("jboss/infinispan-server:9.1.4.Final") .withProtocolVersion(ProtocolVersion.PROTOCOL_VERSION_26) .withCaches("testCache"); diff --git a/src/test/resources/infinispan-90x-standalone.xml b/src/test/resources/infinispan-90x-standalone.xml new file mode 100644 index 0000000..e69de29