Package juju.reattore.util

Examples of juju.reattore.util.Spawner


    public void begin()
        throws Exception {

        log.info("Running '" + startupCmd + "' in dir: " + dir);

        proc = new Spawner();
        proc.setCommand(startupCmd);
        proc.setDir(dir);

        proc.spawn();
View Full Code Here


                log.info("Exit value: " + proc.exitValue());

                log.info("Shutting down using " + shutdownCmd);

                Spawner shut = new Spawner();
                shut.setCommand(shutdownCmd);
               
                shut.spawn();
                shut.waitDone();

                Thread.sleep(2000);
            }
        }
    }
View Full Code Here

    extends TestCase {

    public void testSpawn()
        throws Exception {

        Spawner sp = new Spawner();
        sp.setCommand("ls");

        sp.spawn();
       
        sp.waitDone();

        assertEquals(0, sp.exitValue());

        assertTrue(sp.getOutput().size() > 0);
    }
View Full Code Here

    }

    public void testDestroy()
        throws Exception {

        Spawner sp = new Spawner();
        sp.setCommand("sleep 60");

        sp.spawn();
       
        sp.destroy();

        assertEquals(true, sp.isDone());
    }
View Full Code Here

TOP

Related Classes of juju.reattore.util.Spawner

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.