KEYCLOAK-12964 Fix adapter remote tests execution deciding

This commit is contained in:
mhajas 2020-02-12 12:38:36 +01:00 committed by Pavel Drozd
parent 1bb238d20f
commit c3f0b342bf
2 changed files with 8 additions and 0 deletions

View file

@ -316,6 +316,10 @@ public class AppServerTestEnricher {
return CURRENT_APP_SERVER.contains("fuse");
}
public static boolean isRemoteAppServer() {
return CURRENT_APP_SERVER.contains("remote");
}
private boolean isJBossBased() {
return testContext.getAppServerInfo().isJBossBased();
}

View file

@ -23,6 +23,7 @@ import org.jboss.arquillian.test.spi.execution.ExecutionDecision;
import org.jboss.arquillian.test.spi.execution.TestExecutionDecider;
import org.jboss.arquillian.core.api.Instance;
import org.jboss.arquillian.core.api.annotation.Inject;
import org.keycloak.testsuite.arquillian.AppServerTestEnricher;
import org.keycloak.testsuite.arquillian.AuthServerTestEnricher;
import org.keycloak.testsuite.arquillian.TestContext;
import org.keycloak.testsuite.arquillian.annotation.AuthServerContainerExclude;
@ -39,6 +40,9 @@ public class AuthServerExcludeExecutionDecider implements TestExecutionDecider {
@Override
public ExecutionDecision decide(Method method) {
if (AppServerTestEnricher.isRemoteAppServer()) {
return ExecutionDecision.execute();
}
TestContext testContext = testContextInstance.get();
if (method.isAnnotationPresent(AuthServerContainerExclude.class)) {