KEYCLOAK-18393 SAMLAdapterCrossDCTest failures

This commit is contained in:
Tomas Kyjovsky 2021-06-16 01:11:49 +02:00 committed by Pavel Drozd
parent 78b6762326
commit 6db1c8204a
3 changed files with 9 additions and 4 deletions

View file

@ -816,6 +816,8 @@ It is possible to specify additional parameters:
Example: `-Pauth-server-wildfly,cache-server-infinispan,cache-auth -Dhotrod.sasl.mechanism=SCRAM-SHA-512` Example: `-Pauth-server-wildfly,cache-server-infinispan,cache-auth -Dhotrod.sasl.mechanism=SCRAM-SHA-512`
Note: The cache authentication is not implemented for `SAMLAdapterCrossDCTest`.
Note: The `cache-auth` profile currently doesn't work with the legacy Infinispan/Datagrid modules. See: [KEYCLOAK-18336](https://issues.redhat.com/browse/KEYCLOAK-18336). Note: The `cache-auth` profile currently doesn't work with the legacy Infinispan/Datagrid modules. See: [KEYCLOAK-18336](https://issues.redhat.com/browse/KEYCLOAK-18336).
### Data Grid ### Data Grid

View file

@ -58,7 +58,7 @@ public class InfinispanServerDeployableContainer implements DeployableContainer<
private File pidFile; private File pidFile;
private JMXServiceURL jmxServiceURL; private JMXServiceURL jmxServiceURL;
private static final Boolean CACHE_SERVER_AUTH = Boolean.parseBoolean(System.getProperty("cache.server.auth", "false")); public static final Boolean CACHE_SERVER_AUTH = Boolean.parseBoolean(System.getProperty("cache.server.auth", "false"));
@Override @Override
public Class<InfinispanServerConfiguration> getConfigurationClass() { public Class<InfinispanServerConfiguration> getConfigurationClass() {

View file

@ -30,9 +30,10 @@ import org.keycloak.testsuite.arquillian.annotation.InitialDcState;
import org.keycloak.testsuite.utils.arquillian.ContainerConstants; import org.keycloak.testsuite.utils.arquillian.ContainerConstants;
import org.keycloak.testsuite.crossdc.ServerSetup; import org.keycloak.testsuite.crossdc.ServerSetup;
import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.isEmptyString;
import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.not;
import static org.keycloak.testsuite.adapter.AbstractServletsAdapterTest.samlServletDeployment; import static org.keycloak.testsuite.adapter.AbstractServletsAdapterTest.samlServletDeployment;
import org.keycloak.testsuite.arquillian.containers.InfinispanServerDeployableContainer;
/** /**
* *
@ -46,7 +47,9 @@ public class SAMLAdapterCrossDCTest extends AbstractSAMLAdapterClusteredTest {
@BeforeClass @BeforeClass
public static void checkCrossDcTest() { public static void checkCrossDcTest() {
Assume.assumeThat("Seems not to be running cross-DC tests", System.getProperty("cache.server"), is(notNullValue())); Assume.assumeThat("Seems not to be running cross-DC tests", System.getProperty("cache.server"), not(isEmptyString()));
Assume.assumeFalse(String.format("%s not supported with `cache-auth` profile.", SAMLAdapterCrossDCTest.class),
InfinispanServerDeployableContainer.CACHE_SERVER_AUTH);
} }
private static final String SESSION_CACHE_NAME = EmployeeServletDistributable.DEPLOYMENT_NAME + "-cache"; private static final String SESSION_CACHE_NAME = EmployeeServletDistributable.DEPLOYMENT_NAME + "-cache";