Java Code Examples for org.wildfly.swarm.container.Container#fraction()

The following examples show how to use org.wildfly.swarm.container.Container#fraction() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JGroupsInVmTest.java    From ARCHIVE-wildfly-swarm with Apache License 2.0 6 votes vote down vote up
@Test
public void testCanFindKubePing() throws Exception {
    Container container = new Container();
    container.fraction(new JGroupsFraction()
            .defaultChannel("swarm-jgroups")
            .channel("swarm-jgroups", (c) -> {
                c.stack("udp");
            })
            .stack("udp", (s) -> {
                s.transport("UDP", (t) -> {
                    t.socketBinding("jgroups-udp");
                });
                s.protocol("openshift.KUBE_PING");
            }));
    container.start().stop();
}
 
Example 2
Source File: Main.java    From kubernetes-lab with Apache License 2.0 6 votes vote down vote up
public static void main(String[] args) throws Exception {
	Container container = new Container();

	container.fraction(new DatasourcesFraction().jdbcDriver("com.mysql", (d) -> {
		d.driverClassName("com.mysql.jdbc.Driver");
		d.xaDatasourceClass("com.mysql.jdbc.jdbc2.optional.MysqlXADataSource");
		d.driverModuleName("com.mysql");
	}).dataSource("MySQLDS", (ds) -> {
		ds.driverName("com.mysql");
		ds.connectionUrl(System.getenv().getOrDefault("JDBC_URL", "jdbc:mysql://mysql:3306/guestbook?useSSL=false&autoReconnect=true"));
		ds.userName(System.getenv().getOrDefault("DATASOURCE_USERNAME", "myuser"));
		ds.password(System.getenv().getOrDefault("DATASOURCE_PASSWORD", "mypassword"));
		ds.backgroundValidation(true);
		ds.validConnectionCheckerClassName("org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker");
		ds.validateOnMatch(true);
		ds.checkValidConnectionSql("SELECT 1");
	}));

	// Start the container and deploy the default war
	container.start().deploy();
}
 
Example 3
Source File: HawkularInVmTest.java    From ARCHIVE-wildfly-swarm with Apache License 2.0 4 votes vote down vote up
@Test
public void testSimple() throws Exception {
    Container container = new Container();
    container.fraction(HawkularFraction.createDefaultHawkularFraction());
    container.start().stop();
}
 
Example 4
Source File: TopologyInVmTest.java    From ARCHIVE-wildfly-swarm with Apache License 2.0 4 votes vote down vote up
@Test
public void testSimple() throws Exception {
    Container container = new Container();
    container.fraction(new TopologyFraction());
    container.start().stop();
}
 
Example 5
Source File: MailInVmTest.java    From ARCHIVE-wildfly-swarm with Apache License 2.0 4 votes vote down vote up
@Test
public void testSimple() throws Exception {
    Container container = new Container();
    container.fraction(new MailFraction());
    container.start().stop();
}
 
Example 6
Source File: RemotingInVmTest.java    From ARCHIVE-wildfly-swarm with Apache License 2.0 4 votes vote down vote up
@Test
public void testSimple() throws Exception {
    Container container = new Container();
    container.fraction(new RemotingFraction());
    container.start().stop();
}
 
Example 7
Source File: JSFInVmTest.java    From ARCHIVE-wildfly-swarm with Apache License 2.0 4 votes vote down vote up
@Test
public void testSimple() throws Exception {
    Container container = new Container();
    container.fraction(new JSFFraction());
    container.start().stop();
}
 
Example 8
Source File: EJBInVmTest.java    From ARCHIVE-wildfly-swarm with Apache License 2.0 4 votes vote down vote up
@Test
public void testSimple() throws Exception {
    Container container = new Container();
    container.fraction(EJBFraction.createDefaultFraction());
    container.start().stop();
}
 
Example 9
Source File: JAXRSInVmTest.java    From ARCHIVE-wildfly-swarm with Apache License 2.0 4 votes vote down vote up
@Test
public void testSimple() throws Exception {
    Container container = new Container();
    container.fraction(new JAXRSFraction());
    container.start().stop();
}
 
Example 10
Source File: RibbonInVmTest.java    From ARCHIVE-wildfly-swarm with Apache License 2.0 4 votes vote down vote up
@Test
public void testSimple() throws Exception {
    Container container = new Container();
    container.fraction(new RibbonFraction());
    container.start().stop();
}
 
Example 11
Source File: KeycloakInVmTest.java    From ARCHIVE-wildfly-swarm with Apache License 2.0 4 votes vote down vote up
@Test
public void testSimple() throws Exception {
    Container container = new Container();
    container.fraction(new KeycloakFraction());
    container.start().stop();
}
 
Example 12
Source File: TransactionsInVmTest.java    From ARCHIVE-wildfly-swarm with Apache License 2.0 4 votes vote down vote up
@Test
public void testSimple() throws Exception {
    Container container = new Container();
    container.fraction(TransactionsFraction.createDefaultFraction());
    container.start().stop();
}
 
Example 13
Source File: ConnectorInVmTest.java    From ARCHIVE-wildfly-swarm with Apache License 2.0 4 votes vote down vote up
@Test
public void testSimple() throws Exception {
    Container container = new Container();
    container.fraction(new ConnectorFraction());
    container.start().stop();
}
 
Example 14
Source File: JPAInVmTest.java    From ARCHIVE-wildfly-swarm with Apache License 2.0 4 votes vote down vote up
@Test
public void testSimple() throws Exception {
    Container container = new Container();
    container.fraction(JPAFraction.createDefaultFraction());
    container.start().stop();
}
 
Example 15
Source File: SwaggerWebAppInVmTest.java    From ARCHIVE-wildfly-swarm with Apache License 2.0 4 votes vote down vote up
@Test
public void testSimple() throws Exception {
    Container container = new Container();
    container.fraction(new SwaggerWebAppFraction());
    container.start().stop();
}
 
Example 16
Source File: IOInVmTest.java    From ARCHIVE-wildfly-swarm with Apache License 2.0 4 votes vote down vote up
@Test
public void testSimple() throws Exception {
    Container container = new Container();
    container.fraction(IOFraction.createDefaultFraction());
    container.start().stop();
}
 
Example 17
Source File: JMXInVmTest.java    From ARCHIVE-wildfly-swarm with Apache License 2.0 4 votes vote down vote up
@Test
public void testSimple() throws Exception {
    Container container = new Container();
    container.fraction(new JMXFraction());
    container.start().stop();
}
 
Example 18
Source File: DatasourcesInVmTest.java    From ARCHIVE-wildfly-swarm with Apache License 2.0 4 votes vote down vote up
@Test
public void testSimple() throws Exception {
    Container container = new Container();
    container.fraction(new DatasourcesFraction());
    container.start().stop();
}
 
Example 19
Source File: MSCInVmTest.java    From ARCHIVE-wildfly-swarm with Apache License 2.0 4 votes vote down vote up
@Test
public void testSimple() throws Exception {
    Container container = new Container();
    container.fraction(new MSCFraction());
    container.start().stop();
}
 
Example 20
Source File: EEInVmTest.java    From ARCHIVE-wildfly-swarm with Apache License 2.0 4 votes vote down vote up
@Test
public void testSimple() throws Exception {
    Container container = new Container();
    container.fraction(new EEFraction());
    container.start().stop();
}