Fix JDK 17 InaccessibleObjectException with infinispan
This commit is contained in:
parent
8155774518
commit
a57821ed80
|
@ -77,6 +77,14 @@ if not "x%JAVA_OPTS%" == "x" (
|
|||
set "JAVA_OPTS=-Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF-8"
|
||||
)
|
||||
|
||||
@REM See also https://github.com/wildfly/wildfly-core/blob/7e5624cf92ebe4b64a4793a8c0b2a340c0d6d363/core-feature-pack/common/src/main/resources/content/bin/common.sh#L57-L60
|
||||
if not "x%JAVA_ADD_OPENS%" == "x" (
|
||||
echo "JAVA_ADD_OPENS already set in environment; overriding default settings with values: %JAVA_ADD_OPENS%"
|
||||
) else (
|
||||
set "JAVA_ADD_OPENS=--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED"
|
||||
)
|
||||
set "JAVA_OPTS=%JAVA_OPTS% %JAVA_ADD_OPENS%"
|
||||
|
||||
if not "x%JAVA_OPTS_APPEND%" == "x" (
|
||||
echo "Appending additional Java properties to JAVA_OPTS: %JAVA_OPTS_APPEND%"
|
||||
set "JAVA_OPTS=%JAVA_OPTS% %JAVA_OPTS_APPEND%"
|
||||
|
|
|
@ -90,6 +90,14 @@ else
|
|||
echo "JAVA_OPTS already set in environment; overriding default settings with values: $JAVA_OPTS"
|
||||
fi
|
||||
|
||||
# See also https://github.com/wildfly/wildfly-core/blob/7e5624cf92ebe4b64a4793a8c0b2a340c0d6d363/core-feature-pack/common/src/main/resources/content/bin/common.sh#L57-L60
|
||||
if [ "x$JAVA_ADD_OPENS" = "x" ]; then
|
||||
JAVA_OPTS="--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED"
|
||||
else
|
||||
echo "JAVA_ADD_OPENS already set in environment; overriding default settings with values: $JAVA_ADD_OPENS"
|
||||
fi
|
||||
JAVA_OPTS="$JAVA_OPTS $JAVA_ADD_OPENS"
|
||||
|
||||
if [ "x$JAVA_OPTS_APPEND" != "x" ]; then
|
||||
echo "Appending additional Java properties to JAVA_OPTS: $JAVA_OPTS_APPEND"
|
||||
JAVA_OPTS="$JAVA_OPTS $JAVA_OPTS_APPEND"
|
||||
|
|
|
@ -364,7 +364,7 @@
|
|||
<run>
|
||||
<shmSize>${docker.database.shmsize}</shmSize>
|
||||
<ports>
|
||||
<port>${docker.database.port}</port>
|
||||
<port>${docker.database.port}:${docker.database.port}</port>
|
||||
</ports>
|
||||
<env>
|
||||
<!-- MYSQL and MariaDB -->
|
||||
|
|
|
@ -0,0 +1,96 @@
|
|||
package org.keycloak.testsuite.cluster;
|
||||
|
||||
import org.apache.commons.lang.RandomStringUtils;
|
||||
import org.junit.Before;
|
||||
import org.keycloak.admin.client.resource.ComponentResource;
|
||||
import org.keycloak.admin.client.resource.ComponentsResource;
|
||||
import org.keycloak.representations.idm.ComponentRepresentation;
|
||||
import org.keycloak.storage.UserStorageProvider;
|
||||
import org.keycloak.testsuite.admin.ApiUtil;
|
||||
import org.keycloak.testsuite.arquillian.ContainerInfo;
|
||||
import org.keycloak.testsuite.federation.DummyUserFederationProviderFactory;
|
||||
|
||||
import javax.ws.rs.NotFoundException;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
import static org.junit.Assert.assertNull;
|
||||
|
||||
public class UserFederationInvalidationClusterTest extends AbstractInvalidationClusterTestWithTestRealm<ComponentRepresentation, ComponentResource> {
|
||||
|
||||
@Before
|
||||
public void setExcludedComparisonFields() {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ComponentRepresentation createTestEntityRepresentation() {
|
||||
ComponentRepresentation comp = new ComponentRepresentation();
|
||||
comp.setName("comp_" + RandomStringUtils.randomAlphabetic(5));
|
||||
|
||||
// The provider needs to implement ImportSynchronization to trigger UserStorageSyncManager#notifyToRefreshPeriodicSync
|
||||
comp.setProviderId(DummyUserFederationProviderFactory.PROVIDER_NAME);
|
||||
comp.setProviderType(UserStorageProvider.class.getName());
|
||||
return comp;
|
||||
}
|
||||
|
||||
protected ComponentsResource components(ContainerInfo node) {
|
||||
return getAdminClientFor(node).realm(testRealmName).components();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ComponentResource entityResource(ComponentRepresentation comp, ContainerInfo node) {
|
||||
return entityResource(comp.getId(), node);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ComponentResource entityResource(String id, ContainerInfo node) {
|
||||
return components(node).component(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ComponentRepresentation createEntity(ComponentRepresentation comp, ContainerInfo node) {
|
||||
comp.setParentId(getAdminClientFor(node).realm(testRealmName).toRepresentation().getId());
|
||||
try (Response response = components(node).add(comp)) {
|
||||
String id = ApiUtil.getCreatedId(response);
|
||||
comp.setId(id);
|
||||
}
|
||||
return readEntity(comp, node);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ComponentRepresentation readEntity(ComponentRepresentation comp, ContainerInfo node) {
|
||||
ComponentRepresentation u = null;
|
||||
try {
|
||||
u = entityResource(comp, node).toRepresentation();
|
||||
} catch (NotFoundException nfe) {
|
||||
// expected when component doesn't exist
|
||||
}
|
||||
return u;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ComponentRepresentation updateEntity(ComponentRepresentation comp, ContainerInfo node) {
|
||||
entityResource(comp, node).update(comp);
|
||||
return readEntity(comp, node);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void deleteEntity(ComponentRepresentation comp, ContainerInfo node) {
|
||||
entityResource(comp, node).remove();
|
||||
assertNull(readEntity(comp, node));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ComponentRepresentation testEntityUpdates(ComponentRepresentation comp, boolean backendFailover) {
|
||||
comp.setName(comp.getName() + "_updated");
|
||||
comp = updateEntityOnCurrentFailNode(comp, "name");
|
||||
verifyEntityUpdateDuringFailover(comp, backendFailover);
|
||||
|
||||
return comp;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void assertEntityOnSurvivorNodesEqualsTo(ComponentRepresentation testEntityOnFailNode) {
|
||||
super.assertEntityOnSurvivorNodesEqualsTo(testEntityOnFailNode);
|
||||
}
|
||||
|
||||
}
|
|
@ -160,7 +160,8 @@
|
|||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<argLine>@{argLine} -Xmx1024m -XX:+ExitOnOutOfMemoryError -XX:+HeapDumpOnOutOfMemoryError</argLine>
|
||||
<!-- See also https://github.com/wildfly/wildfly-core/blob/7e5624cf92ebe4b64a4793a8c0b2a340c0d6d363/core-feature-pack/common/src/main/resources/content/bin/common.sh#L57-L60 -->
|
||||
<argLine>@{argLine} -Xmx1024m -XX:+ExitOnOutOfMemoryError -XX:+HeapDumpOnOutOfMemoryError --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED</argLine>
|
||||
<systemPropertyVariables>
|
||||
<!-- keycloak.model.parameters lists parameter classes from
|
||||
org.keycloak.model.parameters package and determine enabled providers -->
|
||||
|
|
Loading…
Reference in New Issue