Examples of BgProcess


Examples of org.codehaus.xharness.procutil.BgProcess

    public void testExecute() throws Exception {
        KillTask kill = new KillTask();
        kill.setProject(project);
        kill.setProcessname(PROC_NAME);
        MockControl ctrl = MockControl.createControl(BgProcess.class);
        BgProcess proc = (BgProcess)ctrl.getMock();
        proc.kill();
       
        ctrl.replay();
        ProcessRegistry.registerProcess(PROC_NAME, proc);
        kill.execute();
        ctrl.verify();
View Full Code Here

Examples of org.codehaus.xharness.procutil.BgProcess

    public void testExecuteFailingKill() throws Exception {
        KillTask kill = new KillTask();
        kill.setProject(project);
        kill.setProcessname(PROC_NAME);
        MockControl ctrl = MockControl.createControl(BgProcess.class);
        BgProcess proc = (BgProcess)ctrl.getMock();
        proc.kill();
        ctrl.setThrowable(new BuildException("blah"));
       
        ctrl.replay();
        ProcessRegistry.registerProcess(PROC_NAME, proc);
        try {
View Full Code Here

Examples of org.codehaus.xharness.procutil.BgProcess

        KillTask kill = new KillTask();
        kill.setProject(project);
        kill.setProcessname(PROC_NAME);
        kill.setFailonerror(false);
        MockControl ctrl = MockControl.createControl(BgProcess.class);
        BgProcess proc = (BgProcess)ctrl.getMock();
        proc.kill();
        ctrl.setThrowable(new BuildException("blah"));
       
        ctrl.replay();
        ProcessRegistry.registerProcess(PROC_NAME, proc);
        kill.execute();
View Full Code Here

Examples of org.codehaus.xharness.procutil.BgProcess

            throw new BuildException(
                    "You must provide a process name in order to use the KillProcess task");
        }

        try {
            BgProcess proc = ProcessRegistry.getProcess(procName);
            log("KillProcess: killing processname " + procName, Project.MSG_VERBOSE);
            proc.kill();
        } catch (BuildException b) {
            if (failonerror) {
                throw b;
            }
        }
View Full Code Here

Examples of org.codehaus.xharness.procutil.BgProcess

        while (iter.hasNext()) {
            Object o = iter.next();
            if (o instanceof ProcessLogger) {
                ProcessLogger pLogger = (ProcessLogger)o;
                if (pLogger.getTask() instanceof BgProcess) {
                    BgProcess proc = (BgProcess)pLogger.getTask();
                    if (!proc.isRunning()) {
                        BuildException be = new BuildException(
                                "Process @" + pLogger.getFullName() + "@ has stopped running");
                        ((ServiceVerifyTask)task).setException(be);
                        return ret;
                    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.