Merge pull request #4756 from tkyjovsk/KEYCLOAK-5922
KEYCLOAK-5922 Cluster tests don't work with non-undertow server
This commit is contained in:
commit
4408cdb5c7
3 changed files with 10 additions and 9 deletions
|
@ -67,7 +67,7 @@
|
||||||
<xsl:template match="//*[local-name()='socket-binding-group' and @name='standard-sockets']">
|
<xsl:template match="//*[local-name()='socket-binding-group' and @name='standard-sockets']">
|
||||||
<xsl:copy>
|
<xsl:copy>
|
||||||
<xsl:apply-templates select="node()|@*"/>
|
<xsl:apply-templates select="node()|@*"/>
|
||||||
<socket-binding name="modcluster" interface="private" port="23364" multicast-address="${{jboss.default.multicast.address:230.0.0.4}}"/>
|
<socket-binding name="modcluster" interface="private" port="23364" multicast-address="${{jboss.default.multicast.address:230.0.0.4}}" multicast-port="23364" />
|
||||||
</xsl:copy>
|
</xsl:copy>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
|
|
@ -216,12 +216,13 @@ public class AuthServerTestEnricher {
|
||||||
suiteContext.setAuthServerInfo(container);
|
suiteContext.setAuthServerInfo(container);
|
||||||
|
|
||||||
containers.stream()
|
containers.stream()
|
||||||
.filter(c -> c.getQualifier().startsWith(AUTH_SERVER_BACKEND))
|
.filter(c -> c.getQualifier().startsWith(AUTH_SERVER_BACKEND))
|
||||||
.forEach(c -> {
|
.sorted((a, b) -> a.getQualifier().compareTo(b.getQualifier())) // ordering is expected by the cluster tests
|
||||||
String portOffsetString = c.getArquillianContainer().getContainerConfiguration().getContainerProperties().getOrDefault("bindHttpPortOffset", "0");
|
.forEach(c -> {
|
||||||
updateWithAuthServerInfo(c, Integer.valueOf(portOffsetString));
|
int portOffset = Integer.parseInt(c.getQualifier().substring(AUTH_SERVER_BACKEND.length()));
|
||||||
suiteContext.addAuthServerBackendsInfo(0, c);
|
updateWithAuthServerInfo(c, portOffset);
|
||||||
});
|
suiteContext.addAuthServerBackendsInfo(0, c);
|
||||||
|
});
|
||||||
|
|
||||||
if (suiteContext.getAuthServerBackendsInfo().isEmpty()) {
|
if (suiteContext.getAuthServerBackendsInfo().isEmpty()) {
|
||||||
throw new RuntimeException(String.format("No auth server container matching '%s' found in arquillian.xml.", AUTH_SERVER_BACKEND));
|
throw new RuntimeException(String.format("No auth server container matching '%s' found in arquillian.xml.", AUTH_SERVER_BACKEND));
|
||||||
|
|
|
@ -180,10 +180,10 @@ public final class SuiteContext {
|
||||||
}
|
}
|
||||||
} else if (isAuthServerCluster()) {
|
} else if (isAuthServerCluster()) {
|
||||||
sb.append(isAuthServerCluster() ? "\nFrontend: " : "")
|
sb.append(isAuthServerCluster() ? "\nFrontend: " : "")
|
||||||
.append(getAuthServerInfo().getQualifier())
|
.append(getAuthServerInfo().getQualifier()).append(" - ").append(getAuthServerInfo().getContextRoot().toExternalForm())
|
||||||
.append("\n");
|
.append("\n");
|
||||||
|
|
||||||
getAuthServerBackendsInfo().forEach(bInfo -> sb.append(" Backend: ").append(bInfo).append("\n"));
|
getAuthServerBackendsInfo().forEach(bInfo -> sb.append(" Backend: ").append(bInfo).append(" - ").append(bInfo.getContextRoot().toExternalForm()).append("\n"));
|
||||||
} else {
|
} else {
|
||||||
sb.append(getAuthServerInfo().getQualifier())
|
sb.append(getAuthServerInfo().getQualifier())
|
||||||
.append("\n");
|
.append("\n");
|
||||||
|
|
Loading…
Reference in a new issue