Search in sources :

Example 11 with CommandContextConfiguration

use of org.jboss.as.cli.impl.CommandContextConfiguration in project wildfly-core by wildfly.

the class ShutdownTestCase method test.

@Test
public void test() throws Exception {
    serverController.start();
    CommandContextConfiguration config = new CommandContextConfiguration.Builder().setController("remote+http://" + TestSuiteEnvironment.getServerAddress() + ":" + TestSuiteEnvironment.getServerPort()).build();
    CommandContext ctx = CommandContextFactory.getInstance().newCommandContext(config);
    ctx.handle("command-timeout set 60");
    ctx.handle("connect");
    ctx.handle("shutdown");
}
Also used : CommandContext(org.jboss.as.cli.CommandContext) CommandContextConfiguration(org.jboss.as.cli.impl.CommandContextConfiguration) Test(org.junit.Test)

Aggregations

CommandContextConfiguration (org.jboss.as.cli.impl.CommandContextConfiguration)11 Test (org.junit.Test)10 ByteArrayOutputStream (java.io.ByteArrayOutputStream)9 File (java.io.File)4 ModelNode (org.jboss.dmr.ModelNode)2 IOException (java.io.IOException)1 CommandContext (org.jboss.as.cli.CommandContext)1 EmptySubsystemParser (org.jboss.as.test.integration.management.extension.EmptySubsystemParser)1 Before (org.junit.Before)1