Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

Commit

Permalink
Add a couple more module deps openshift-ping needs to actually work
Browse files Browse the repository at this point in the history
This also adds an ignored test in RibbonInVmTest. Unignoring the test
lets me manually verify KubePing is booting and attempt to contact a
kubernetes server but since we can't assume a server exists it fails
past that.
  • Loading branch information
bbrowning committed Nov 3, 2015
1 parent 7f13e0f commit 8afc2b7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
Expand Up @@ -39,7 +39,13 @@ public static JGroupsFraction defaultFraction() {
s.transport( "UDP", (t)->{
t.socketBinding("jgroups-udp");
});
s.protocol( "PING" );
if (System.getenv("OPENSHIFT_BUILD_NAME") != null ||
System.getenv("OPENSHIFT_BUILD_REFERENCE") != null ||
"openshift".equalsIgnoreCase(System.getProperty("wildfly.swarm.environment"))) {
s.protocol( "openshift.KUBE_PING" );
} else {
s.protocol( "PING" );
}
s.protocol( "FD_SOCK", (p)->{
p.socketBinding( "jgroups-udp-fd" );
});
Expand Down
Expand Up @@ -5,6 +5,8 @@
</resources>

<dependencies>
<module name="io.undertow.core"/>
<module name="javax.api"/>
<module name="org.jgroups"/>
</dependencies>
</module>
Expand Up @@ -15,6 +15,7 @@
*/
package org.wildfly.swarm.ribbon;

import org.junit.Ignore;
import org.junit.Test;
import org.wildfly.swarm.container.Container;
import org.wildfly.swarm.netflix.ribbon.RibbonFraction;
Expand All @@ -30,4 +31,16 @@ public void testSimple() throws Exception {
container.fraction( new RibbonFraction() );
container.start().stop();
}

@Test
@Ignore
public void testCanFindKubePing() throws Exception {
// TODO: We can't easily test KubePing without a server to hit
System.setProperty("wildfly.swarm.environment", "openshift");
Container container = new Container();
container.start();
// TODO: something useful here to verify we're actually using KubePing
container.stop();
System.setProperty("wildfly.swarm.environment", "");
}
}

0 comments on commit 8afc2b7

Please sign in to comment.