Search in sources :

Example 6 with CreateSwarm

use of org.wildfly.swarm.arquillian.CreateSwarm in project wildfly-swarm by wildfly-swarm.

the class EEArquillianTest method newSwarm.

@CreateSwarm
public static Swarm newSwarm() throws Exception {
    EEFraction fraction = new EEFraction();
    fraction.applyDefaults();
    return new Swarm().fraction(fraction);
}
Also used : CreateSwarm(org.wildfly.swarm.arquillian.CreateSwarm) Swarm(org.wildfly.swarm.Swarm) CreateSwarm(org.wildfly.swarm.arquillian.CreateSwarm)

Example 7 with CreateSwarm

use of org.wildfly.swarm.arquillian.CreateSwarm in project wildfly-swarm by wildfly-swarm.

the class SWARM553Test method newContainer.

@CreateSwarm
public static Swarm newContainer() throws Exception {
    return new Swarm().fraction(new LoggingFraction().periodicSizeRotatingFileHandler("FILE", (h) -> {
        h.level(Level.INFO).append(true).suffix(".yyyy-MM-dd").rotateSize("30m").enabled(true).encoding("UTF-8").maxBackupIndex(2);
        Map<String, String> fileSpec = new HashMap<>();
        fileSpec.put("path", logFile);
        h.file(fileSpec);
    }).logger("br.org.sistemafieg.cliente", (l) -> {
        l.level(Level.INFO).handler("FILE");
    }));
}
Also used : ShrinkWrap(org.jboss.shrinkwrap.api.ShrinkWrap) Arquillian(org.jboss.arquillian.junit.Arquillian) Swarm(org.wildfly.swarm.Swarm) Logger(org.jboss.logging.Logger) RunWith(org.junit.runner.RunWith) JARArchive(org.wildfly.swarm.spi.api.JARArchive) Assert.assertTrue(org.junit.Assert.assertTrue) HashMap(java.util.HashMap) Test(org.junit.Test) UUID(java.util.UUID) Archive(org.jboss.shrinkwrap.api.Archive) Collectors(java.util.stream.Collectors) File(java.io.File) FileNotFoundException(java.io.FileNotFoundException) Level(org.wildfly.swarm.config.logging.Level) CreateSwarm(org.wildfly.swarm.arquillian.CreateSwarm) List(java.util.List) Deployment(org.jboss.arquillian.container.test.api.Deployment) Map(java.util.Map) BufferedReader(java.io.BufferedReader) FileReader(java.io.FileReader) Swarm(org.wildfly.swarm.Swarm) CreateSwarm(org.wildfly.swarm.arquillian.CreateSwarm) HashMap(java.util.HashMap) CreateSwarm(org.wildfly.swarm.arquillian.CreateSwarm)

Aggregations

CreateSwarm (org.wildfly.swarm.arquillian.CreateSwarm)7 Swarm (org.wildfly.swarm.Swarm)6 Deployment (org.jboss.arquillian.container.test.api.Deployment)2 Arquillian (org.jboss.arquillian.junit.Arquillian)2 Archive (org.jboss.shrinkwrap.api.Archive)2 ShrinkWrap (org.jboss.shrinkwrap.api.ShrinkWrap)2 Test (org.junit.Test)2 RunWith (org.junit.runner.RunWith)2 MonitorFraction (org.wildfly.swarm.monitor.MonitorFraction)2 BufferedReader (java.io.BufferedReader)1 File (java.io.File)1 FileNotFoundException (java.io.FileNotFoundException)1 FileReader (java.io.FileReader)1 Method (java.lang.reflect.Method)1 HashMap (java.util.HashMap)1 List (java.util.List)1 Map (java.util.Map)1 Properties (java.util.Properties)1 UUID (java.util.UUID)1 Collectors (java.util.stream.Collectors)1