Skip to content

Updates for 16.0 #356

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions .github/workflows/pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ on:
push:
branches:
- main
- 15.0.x
- development
- 14.0.x
pull_request:
branches:
- main
- 15.0.x
- development
- 14.0.x

jobs:
test:
Expand All @@ -26,26 +26,32 @@ jobs:
cache: maven

- if: github.base_ref == 'main' || github.ref_name == 'main'
name: Start Infinispan Server Latest Version
name: Start Infinispan Server Latest Stable Version
run: |
docker run -d -p 11222:11222 -e USER="admin" -e PASS="password" quay.io/infinispan/server:15.0
docker run -d -p 11222:11222 -e USER="admin" -e PASS="password" quay.io/infinispan/server:15.2 -c infinispan-xsite.xml -Dinfinispan.site.name=LON -Djgroups.mcast_port=46656
docker run -d -p 31223:11222 -e USER="admin" -e PASS="password" quay.io/infinispan/server:15.2 -c infinispan-xsite.xml -Dinfinispan.site.name=NYC -Djgroups.mcast_port=46666
# Wait for server to startup
curl --fail --silent --show-error --retry-all-errors --retry 240 --retry-delay 1 http://localhost:11222/rest/v2/container/health/status > /dev/null
curl --fail --silent --show-error --retry-all-errors --retry 240 --retry-delay 1 http://localhost:31223/rest/v2/container/health/status > /dev/null

- if: github.base_ref == 'development' || github.ref_name == 'development'
name: Start Infinispan Server Latest Version
name: Start Infinispan Server Latest Development Version
run: |
docker run -d -p 11222:11222 -e USER="admin" -e PASS="password" quay.io/infinispan-test/server:main
docker run -d -p 11222:11222 -e USER="admin" -e PASS="password" quay.io/infinispan-test/server:main -c infinispan-xsite.xml -Dinfinispan.site.name=LON -Djgroups.mcast_port=46656
docker run -d -p 31223:11222 -e USER="admin" -e PASS="password" quay.io/infinispan-test/server:main -c infinispan-xsite.xml -Dinfinispan.site.name=NYC -Djgroups.mcast_port=46666

# Wait for server to startup
curl --fail --silent --show-error --retry-all-errors --retry 240 --retry-delay 1 http://localhost:11222/rest/v2/container/health/status > /dev/null
curl --fail --silent --show-error --retry-all-errors --retry 240 --retry-delay 1 http://localhost:31223/rest/v2/container/health/status > /dev/null

- if: github.base_ref == '14.0.x' || github.ref_name == '14.0.x'
name: Start Infinispan Server Latest Version
- if: github.base_ref == '15.0.x' || github.ref_name == '15.0.x'
name: Start Infinispan Server Latest 15.0 LTS Version
run: |
docker run -d -p 11222:11222 -e USER="admin" -e PASS="password" quay.io/infinispan/server:14.0
docker run -d -p 11222:11222 -e USER="admin" -e PASS="password" quay.io/infinispan/server:15.0 -c infinispan-xsite.xml -Dinfinispan.site.name=LON -Djgroups.mcast_port=46656
docker run -d -p 31223:11222 -e USER="admin" -e PASS="password" quay.io/infinispan/server:15.0 -c infinispan-xsite.xml -Dinfinispan.site.name=NYC -Djgroups.mcast_port=46666
# Wait for server to startup
curl --fail --silent --show-error --retry-all-errors --retry 240 --retry-delay 1 http://localhost:11222/rest/v2/cache-managers/default/health/status > /dev/null

curl --fail --silent --show-error --retry-all-errors --retry 240 --retry-delay 1 http://localhost:11222/rest/v2/container/health/status > /dev/null
curl --fail --silent --show-error --retry-all-errors --retry 240 --retry-delay 1 http://localhost:31223/rest/v2/container/health/status > /dev/null

- name: JDK 17 Tests
run: ./mvnw -B clean install -Dmaven.test.failure.ignore=true
Expand Down
2 changes: 1 addition & 1 deletion infinispan-embedded/kubernetes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
<name>${options.image}</name>
<alias>infinispan</alias>
<build>
<from>registry.access.redhat.com/ubi9/openjdk-21-runtime</from>
<from>eclipse-temurin:21-jre</from>
<env>
<JAVA_APP_JAR>/maven/${project.artifactId}-${project.version}.jar</JAVA_APP_JAR>
<JAVA_OPTS>${options.debug} ${options.useIPv4} ${options.dnsPing}</JAVA_OPTS>
Expand Down
2 changes: 1 addition & 1 deletion infinispan-remote/connect-to-infinispan-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>1.20.4</version>
<version>${testcontainers.version}</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.infinispan.client.hotrod.RemoteCacheManager;
import org.infinispan.client.hotrod.configuration.ConfigurationBuilder;
import org.infinispan.client.hotrod.impl.ConfigurationProperties;
import org.infinispan.commons.util.Version;
import org.infinispan.server.test.core.InfinispanContainer;

/**
Expand All @@ -23,7 +24,6 @@ public class TutorialsConnectorHelper {
"<distributed-cache name=\"CACHE_NAME\" statistics=\"true\">\n"
+ " <encoding media-type=\"application/x-protostream\"/>\n"
+ "</distributed-cache>";

/**
* Returns the configuration builder with the connection information
*
Expand Down Expand Up @@ -104,13 +104,19 @@ public static InfinispanContainer startInfinispanContainer() {

public static InfinispanContainer startInfinispanContainer(long millis) {
try {
INFINISPAN_CONTAINER = new InfinispanContainer();
if (Version.getUnbrandedVersion().contains("SNAPSHOT")) {
// we are using an Infinispan Dev version, use the latest build of the image
INFINISPAN_CONTAINER = new InfinispanContainer("quay.io/infinispan-test/server:main");
} else {
INFINISPAN_CONTAINER = new InfinispanContainer();
}
INFINISPAN_CONTAINER.withUser(USER);
INFINISPAN_CONTAINER.withPassword(PASSWORD);
INFINISPAN_CONTAINER.start();
Thread.sleep(millis);
} catch (Exception ex) {
System.out.println("Unable to start Infinispan container");
stopInfinispanContainer();
return null;
}
return INFINISPAN_CONTAINER;
Expand Down
12 changes: 0 additions & 12 deletions infinispan-remote/continuous-query/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,6 @@
<artifactId>connect-to-infinispan-server</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-client-hotrod</artifactId>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-remote-query-client</artifactId>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-query-dsl</artifactId>
</dependency>
<dependency>
<groupId>org.infinispan.protostream</groupId>
<artifactId>protostream-processor</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ networks:
driver: bridge
services:
infinispan-server-lon-1:
image: quay.io/infinispan/server:15.0
image: quay.io/infinispan-test/server-main
ports:
- "11222:11222"
container_name: ispn-lon-1
Expand All @@ -14,9 +14,9 @@ services:
PASS: password
networks:
- mynetwork
command: -c infinispan-xsite.xml -Dinfinispan.site.name=LON -Djgroups.mcast_port=46656
# command: -c infinispan-xsite.xml -Dinfinispan.site.name=LON -Djgroups.mcast_port=46656
infinispan-server-lon-2:
image: quay.io/infinispan/server:15.0
image: quay.io/infinispan/server:15.2
ports:
- "11221:11222"
container_name: ispn-lon-2
Expand All @@ -25,26 +25,26 @@ services:
PASS: password
networks:
- mynetwork
command: -c infinispan-xsite.xml -Dinfinispan.site.name=LON -Djgroups.mcast_port=46656
infinispan-server-nyc-1:
image: quay.io/infinispan/server:15.0
ports:
- "31222:11222"
container_name: ispn-nyc-1
environment:
USER: admin
PASS: password
networks:
- mynetwork
command: -c infinispan-xsite.xml -Dinfinispan.site.name=NYC -Djgroups.mcast_port=46666
infinispan-server-nyc-2:
image: quay.io/infinispan/server:15.0
ports:
- "31223:11222"
container_name: ispn-nyc-2
environment:
USER: admin
PASS: password
networks:
- mynetwork
command: -c infinispan-xsite.xml -Dinfinispan.site.name=NYC -Djgroups.mcast_port=46666
# command: -c infinispan-xsite.xml -Dinfinispan.site.name=LON -Djgroups.mcast_port=46656
# infinispan-server-nyc-1:
# image: quay.io/infinispan/server:15.0
# ports:
# - "31222:11222"
# container_name: ispn-nyc-1
# environment:
# USER: admin
# PASS: password
# networks:
# - mynetwork
# command: -c infinispan-xsite.xml -Dinfinispan.site.name=NYC -Djgroups.mcast_port=46666
# infinispan-server-nyc-2:
# image: quay.io/infinispan/server:15.0
# ports:
# - "31223:11222"
# container_name: ispn-nyc-2
# environment:
# USER: admin
# PASS: password
# networks:
# - mynetwork
# command: -c infinispan-xsite.xml -Dinfinispan.site.name=NYC -Djgroups.mcast_port=46666
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ static void manipulateCacheAndSwitchCluster() {
cache.put("hello", "world");
printCluster("LON", cache);
System.out.println("hello " + cache.get("hello") + " from LON");
client.switchToCluster("NYC");
printCluster("NYC", cache);
System.out.println("hello " + cache.get("hello") + " from NYC");
cache.put("hello-nyc", "world");
Expand All @@ -56,7 +55,9 @@ public static void connectToInfinispan() {
cache = client.administration()
// this cache should exist if you start with docker-compose and run the create-data.sh script
.getOrCreateCache(XSITE_CACHE, new StringConfiguration("<distributed-cache/>"));

client.switchToCluster("NYC");
client.administration().getOrCreateCache(XSITE_CACHE, new StringConfiguration("<distributed-cache/>"));
client.switchToDefaultCluster();
}

public static void disconnect(boolean removeCache) {
Expand Down
9 changes: 0 additions & 9 deletions infinispan-remote/junit5/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,4 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- JUnit 5 requires Surefire version 2.22.1 or higher -->
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.2</version>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

import org.infinispan.client.hotrod.RemoteCache;
import org.infinispan.client.hotrod.RemoteCacheManager;
import org.infinispan.commons.util.Version;
import org.infinispan.server.test.core.ServerRunMode;
import org.infinispan.server.test.core.TestSystemPropertyNames;
import org.infinispan.server.test.junit5.InfinispanServerExtension;
import org.infinispan.server.test.junit5.InfinispanServerExtensionBuilder;
import org.junit.jupiter.api.Test;
Expand All @@ -16,7 +19,21 @@
public class CachingServiceTest {

@RegisterExtension
static InfinispanServerExtension infinispanServerExtension = InfinispanServerExtensionBuilder.server();
static InfinispanServerExtension infinispanServerExtension = buildExtension();

static InfinispanServerExtension buildExtension() {
if (Version.getUnbrandedVersion().contains("SNAPSHOT")) {
// In our dev branch, we need to build with the latest main branch image.
return InfinispanServerExtensionBuilder
.config()
.numServers(1)
.runMode(ServerRunMode.CONTAINER)
.property(TestSystemPropertyNames.INFINISPAN_TEST_SERVER_BASE_IMAGE_NAME, "quay.io/infinispan-test/server:main")
.build();
}

return InfinispanServerExtensionBuilder.server();
}

@Test
public void testUsingRemoteCacheManager(){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.infinispan.tutorial.simple.remote.percache;

import org.infinispan.client.hotrod.DefaultTemplate;
import org.infinispan.client.hotrod.RemoteCache;
import org.infinispan.client.hotrod.RemoteCacheManager;
import org.infinispan.client.hotrod.configuration.ConfigurationBuilder;
import org.infinispan.commons.configuration.StringConfiguration;
import org.infinispan.tutorial.simple.connect.TutorialsConnectorHelper;

/**
Expand All @@ -24,6 +24,7 @@ public class InfinispanRemotePerCache {
public static final String MY_CACHE = "my-cache";
public static final String ANOTHER_CACHE = "another-cache";
public static final String URI_CACHE = "uri-cache";
public static final String MY_CUSTOM_TEMPLATE = "my-custom-template";
static RemoteCacheManager cacheManager;
static RemoteCache<String, String> cache;
static RemoteCache<String, String> anotherCache;
Expand Down Expand Up @@ -64,7 +65,9 @@ public static void connectToInfinispan() throws Exception {

//Add per-cache configuration that uses an org.infinispan cache template.
builder.remoteCache(MY_CACHE)
.templateName(DefaultTemplate.DIST_SYNC);
// we can declare a template, even if the template does not exist yet.
// however, the template has to be present on first access to create the cache.
.templateName(MY_CUSTOM_TEMPLATE);
//Add per-cache configuration with a cache definition in XML format.
builder.remoteCache(ANOTHER_CACHE)
.configuration("<distributed-cache name=\"another-cache\"><encoding media-type=\"application/x-protostream\"/></distributed-cache>");
Expand All @@ -73,6 +76,9 @@ public static void connectToInfinispan() throws Exception {
InfinispanRemotePerCache.class.getClassLoader().getResource("cacheConfig.xml").toURI());

cacheManager = TutorialsConnectorHelper.connect(builder);
// create the template that is used to create MY-CACHE on first access
cacheManager.administration().removeTemplate(MY_CUSTOM_TEMPLATE);
cacheManager.administration().createTemplate(MY_CUSTOM_TEMPLATE, new StringConfiguration("<distributed-cache><encoding media-type=\"application/x-protostream\"/></distributed-cache>"));
}

public static void disconnect(boolean removeCaches) {
Expand Down
16 changes: 0 additions & 16 deletions infinispan-remote/persistence/sql-store/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@
<artifactId>connect-to-infinispan-server</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-client-hotrod</artifactId>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-remote-query-client</artifactId>
</dependency>
<dependency>
<groupId>org.infinispan.protostream</groupId>
<artifactId>protostream-processor</artifactId>
Expand All @@ -58,14 +50,6 @@

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.2</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
Expand Down
23 changes: 0 additions & 23 deletions infinispan-remote/programmatic-protostream-marshalling/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,29 +42,6 @@
<artifactId>connect-to-infinispan-server</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-api</artifactId>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-client-hotrod</artifactId>
</dependency>

<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-remote-query-client</artifactId>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-query-dsl</artifactId>
</dependency>
<dependency>
<groupId>org.infinispan.protostream</groupId>
<artifactId>protostream-processor</artifactId>
<version>${version.protostream}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
Expand Down
18 changes: 0 additions & 18 deletions infinispan-remote/query/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,6 @@
<artifactId>connect-to-infinispan-server</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-api</artifactId>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-client-hotrod</artifactId>
</dependency>

<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-remote-query-client</artifactId>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-query-dsl</artifactId>
</dependency>
<dependency>
<groupId>org.infinispan.protostream</groupId>
<artifactId>protostream-processor</artifactId>
Expand Down
Loading