Skip to content

Commit

Permalink
Enable protostream (#853)
Browse files Browse the repository at this point in the history
* Enables protostream encoding in the external Infinispan
* Changes the testsuite to use the Hot Rod client

Closes #628

Signed-off-by: Pedro Ruivo <[email protected]>
  • Loading branch information
pruivo committed Jun 19, 2024
1 parent 077679e commit 2a70cca
Show file tree
Hide file tree
Showing 7 changed files with 176 additions and 201 deletions.
7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

<properties>
<keycloak.version>999.0.0-SNAPSHOT</keycloak.version>
<infinispan.version>15.0.4.Final</infinispan.version>
<junit5.version>5.10.1</junit5.version>
<httpclient.version>4.5.14</httpclient.version>
<maven.enforcer.plugin.version>3.4.1</maven.enforcer.plugin.version>
Expand Down Expand Up @@ -88,6 +89,12 @@
<version>${httpclient.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-client-rest</artifactId>
<version>${infinispan.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
2 changes: 2 additions & 0 deletions provision/infinispan/ispn-helm/templates/infinispan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ spec:
owners: {{ $config.owners | default $.Values.cacheDefaults.owners | quote }}
statistics: "true"
remoteTimeout: {{ $config.remoteTimeout | default $.Values.cacheDefaults.remoteTimeout }}
encoding:
media-type: "application/x-protostream"
locking:
acquireTimeout: {{ $config.lockTimeout | default $.Values.cacheDefaults.lockTimeout }}
{{- if and $config.memory $config.memory.maxCount }}
Expand Down
10 changes: 10 additions & 0 deletions provision/rosa-cross-dc/keycloak-benchmark-crossdc-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,16 @@
<artifactId>openshift-client</artifactId>
<version>${fabric8.version}</version>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-client-rest</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-model-infinispan</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<profiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ public class LoginLogoutTest extends AbstractCrossDCTest {
protected static final Logger LOG = Logger.getLogger(LoginLogoutTest.class);

@Test
@Disabled
public void loginLogoutTest() throws URISyntaxException, IOException, InterruptedException {
//Login and exchange code in DC1
String code = LOAD_BALANCER_KEYCLOAK.usernamePasswordLogin(REALM_NAME, USERNAME, MAIN_PASSWORD, CLIENTID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public DatacenterInfo(HttpClient httpClient, int index, boolean activePassive) {
this.loadbalancerURL = getRouteHost("keycloak");

this.keycloak = new KeycloakClient(httpClient, keycloakServerURL, activePassive);
this.infinispan = new ExternalInfinispanClient(httpClient, infinispanServerURL, AbstractCrossDCTest.ISPN_USERNAME, AbstractCrossDCTest.MAIN_PASSWORD, keycloakServerURL);
this.infinispan = new ExternalInfinispanClient(infinispanServerURL, AbstractCrossDCTest.ISPN_USERNAME, AbstractCrossDCTest.MAIN_PASSWORD);
}

private String getRouteHost(String app) {
Expand All @@ -75,6 +75,7 @@ private String getRouteHost(String app) {

@Override
public void close() {
infinispan.close();
this.oc.close();
}

Expand Down
Loading

0 comments on commit 2a70cca

Please sign in to comment.