Examples of OfficeWatcher


Examples of helper.OfficeWatcher

            timeOut = 3000;
        } else {
            timeOut = param.getInt(PropertyName.TIME_OUT) / 2;
        }

        OfficeWatcher ow = (OfficeWatcher) param.get(PropertyName.OFFICE_WATCHER);

        while (changedText && !procHdl.isFinished()) {
            count++;
            if (ow != null) {
                ow.ping();
            }
            log.println("CheckModuleAPI: waiting... " + count);
            utils.shortWait(timeOut);
            if (ow != null) {
                ow.ping();
            }
            // check for changes in the output stream. If there are no changes, the process maybe hangs
            if (procHdl.getOutputText().equals(memText)) {
                changedText = false;
            }
View Full Code Here

Examples of helper.OfficeWatcher

           
            // Watcher Object is need in log object to give a simple way to say if a running office is alive.
            // As long as a log comes, it pings the Watcher and says the office is alive, if not an
            // internal counter increase and at a given point (300 seconds) the office is killed.
            GlobalLogWriter.get().println("Set office watcher");
            OfficeWatcher aWatcher = (OfficeWatcher)param.get("Watcher");
            GlobalLogWriter.get().setWatcher(aWatcher);
            // initializeWatcher(param);

            String sStatusRunThrough = "";
            String sStatusMessage = "";
            try
            {
                DB.destination_start();
                // better was:
                // load document
                // create postscript from document
                // check file
                GraphicalDifferenceCheck.checkOneFile(_sInputFile, _sOutputPath, _sReferencePath, _sDiffPath, aGTA);
                sStatusRunThrough = "PASSED, OK";
                DB.destination_finished();
            }
            catch(ConvWatchCancelException e)
            {
                assure(e.getMessage(), false, true);
                sStatusRunThrough = "CANCELLED, FAILED";
                sStatusMessage = e.getMessage();
                DB.destination_failed(sStatusRunThrough, sStatusMessage);
            }
            catch(ConvWatchException e)
            {
                assure(e.getMessage(), false, true);
                sStatusMessage = e.getMessage();
                sStatusRunThrough = "PASSED, FAILED";
                DB.destination_failed(sStatusRunThrough, sStatusMessage);
            }
            catch(com.sun.star.lang.DisposedException e)
            {
                assure(e.getMessage(), false, true);
                sStatusMessage = e.getMessage();
                sStatusRunThrough = "FAILED, FAILED";
                DB.destination_failed(sStatusRunThrough, sStatusMessage);
            }
       
            GlobalLogWriter.get().println("Watcher count is: " + aWatcher.getPing());

            // Office shutdown
            if (aProvider != null)
            {
                aProvider.closeExistingOffice(param, true);
View Full Code Here

Examples of helper.OfficeWatcher

           
            // Watcher Object is need in log object to give a simple way to say if a running office is alive.
            // As long as a log comes, it pings the Watcher and says the office is alive, if not an
            // internal counter increase and at a given point (300 seconds) the office is killed.
            GlobalLogWriter.get().println("Set office watcher");
            OfficeWatcher aWatcher = (OfficeWatcher)param.get("Watcher");
            GlobalLogWriter.get().setWatcher(aWatcher);
            // initializeWatcher(param);

            String sStatusRunThrough = "";
            String sStatusMessage = "";
            try
            {
                DB.destination_start();
                // better was:
                // load document
                // create postscript from document
                // check file
                GraphicalDifferenceCheck.checkOneFile(_sInputFile, _sOutputPath, _sReferencePath, _sDiffPath, aGTA);
                sStatusRunThrough = "PASSED, OK";
                DB.destination_finished();
            }
            catch(ConvWatchCancelException e)
            {
                assure(e.getMessage(), false, true);
                sStatusRunThrough = "CANCELLED, FAILED";
                sStatusMessage = e.getMessage();
                DB.destination_failed(sStatusRunThrough, sStatusMessage);
            }
            catch(ConvWatchException e)
            {
                assure(e.getMessage(), false, true);
                sStatusMessage = e.getMessage();
                sStatusRunThrough = "PASSED, FAILED";
                DB.destination_failed(sStatusRunThrough, sStatusMessage);
            }
            catch(com.sun.star.lang.DisposedException e)
            {
                assure(e.getMessage(), false, true);
                sStatusMessage = e.getMessage();
                sStatusRunThrough = "FAILED, FAILED";
                DB.destination_failed(sStatusRunThrough, sStatusMessage);
            }
       
            GlobalLogWriter.get().println("Watcher count is: " + aWatcher.getPing());

            // Office shutdown
            if (aProvider != null)
            {
                aProvider.closeExistingOffice(param, true);
View Full Code Here

Examples of helper.OfficeWatcher

            } catch (RuntimeException e) {
                helper.ProcessHandler ph = (helper.ProcessHandler) param.get(
                                                   "AppProvider");

                if (ph != null) {
                    OfficeWatcher ow = (OfficeWatcher) param.get("Watcher");

                    if ((ow != null) && ow.isAlive()) {
                        ow.finish = true;
                    }

                    ph.kill();
                    shortWait(5000);
                }

                continue;
            }

            TestEnvironment tEnv = tCase.getTestEnvironment(param);

            if (tEnv == null) {
                sumIt.summarizeDown(entry, "Unable to create testcase");

                LogWriter sumObj = OutProducerFactory.createOutProducer(param);
                sumObj.initialize(entry, true);
                sumObj.summary(entry);

                helper.ProcessHandler ph = (helper.ProcessHandler) param.get(
                                                   "AppProvider");

                if (ph != null) {
                    OfficeWatcher ow = (OfficeWatcher) param.get("Watcher");

                    if ((ow != null) && ow.isAlive()) {
                        ow.finish = true;
                    }

                    ph.kill();
                    shortWait(5000);
View Full Code Here

Examples of helper.OfficeWatcher

    public void ReportDesignTest()
        {
            convwatch.GlobalLogWriter.set(log);

            GlobalLogWriter.get().println("Set office watcher");
            OfficeWatcher aWatcher = (OfficeWatcher)param.get("Watcher");
            GlobalLogWriter.get().setWatcher(aWatcher);

            try
            {
                   
View Full Code Here

Examples of helper.OfficeWatcher

    public void ReportDesignTest()
        {
            convwatch.GlobalLogWriter.set(log);

            GlobalLogWriter.get().println("Set office watcher");
            OfficeWatcher aWatcher = (OfficeWatcher)param.get("Watcher");
            GlobalLogWriter.get().setWatcher(aWatcher);

            try
            {
                   
View Full Code Here

Examples of helper.OfficeWatcher

           
            // Watcher Object is need in log object to give a simple way to say if a running office is alive.
            // As long as a log comes, it pings the Watcher and says the office is alive, if not an
            // internal counter increase and at a given point (300 seconds) the office is killed.
            GlobalLogWriter.get().println("Set office watcher");
            OfficeWatcher aWatcher = (OfficeWatcher)param.get("Watcher");
            GlobalLogWriter.get().setWatcher(aWatcher);
            // initializeWatcher(param);

            String sStatusRunThrough = "";
            String sStatusMessage = "";
            try
            {
                DB.destination_start();
                // better was:
                // load document
                // create postscript from document
                // check file
                GraphicalDifferenceCheck.checkOneFile(_sInputFile, _sOutputPath, _sReferencePath, _sDiffPath, aGTA);
                sStatusRunThrough = "PASSED, OK";
                DB.destination_finished();
            }
            catch(ConvWatchCancelException e)
            {
                assure(e.getMessage(), false, true);
                sStatusRunThrough = "CANCELLED, FAILED";
                sStatusMessage = e.getMessage();
                DB.destination_failed(sStatusRunThrough, sStatusMessage);
            }
            catch(ConvWatchException e)
            {
                assure(e.getMessage(), false, true);
                sStatusMessage = e.getMessage();
                sStatusRunThrough = "PASSED, FAILED";
                DB.destination_failed(sStatusRunThrough, sStatusMessage);
            }
            catch(com.sun.star.lang.DisposedException e)
            {
                assure(e.getMessage(), false, true);
                sStatusMessage = e.getMessage();
                sStatusRunThrough = "FAILED, FAILED";
                DB.destination_failed(sStatusRunThrough, sStatusMessage);
            }
       
            GlobalLogWriter.get().println("Watcher count is: " + aWatcher.getPing());

            // Office shutdown
            if (aProvider != null)
            {
                aProvider.closeExistingOffice(param, true);
View Full Code Here

Examples of helper.OfficeWatcher

    public void ReportDesignTest()
        {
            convwatch.GlobalLogWriter.set(log);

            GlobalLogWriter.get().println("Set office watcher");
            OfficeWatcher aWatcher = (OfficeWatcher)param.get("Watcher");
            GlobalLogWriter.get().setWatcher(aWatcher);

            try
            {
                   
View Full Code Here

Examples of helper.OfficeWatcher

                helper.ProcessHandler ph = (helper.ProcessHandler) param.get(
                        "AppProvider");

                if (ph != null)
                {
                    OfficeWatcher ow = (OfficeWatcher) param.get("Watcher");

                    if ((ow != null) && ow.isAlive())
                    {
                        ow.finish = true;
                    }

                    ph.kill();
                    shortWait(5000);
                }

                continue;
            }

            TestEnvironment tEnv = tCase.getTestEnvironment(param);

            if (tEnv == null)
            {
                sumIt.summarizeDown(entry, "Unable to create testcase");

                LogWriter sumObj = OutProducerFactory.createOutProducer(param);
                sumObj.initialize(entry, true);
                sumObj.summary(entry);

                helper.ProcessHandler ph = (helper.ProcessHandler) param.get(
                        "AppProvider");

                if (ph != null)
                {
                    OfficeWatcher ow = (OfficeWatcher) param.get("Watcher");

                    if ((ow != null) && ow.isAlive())
                    {
                        ow.finish = true;
                    }

                    ph.kill();
View Full Code Here

Examples of helper.OfficeWatcher

        // As long as a log comes, it pings the Watcher and says the office is alive, if not an
        // internal counter increase and at a given point (300 seconds) the office is killed.
        if (GlobalLogWriter.get().getWatcher() == null)
        {
            GlobalLogWriter.println("Set office watcher");
            OfficeWatcher aWatcher = (OfficeWatcher)m_aParameterHelper.getTestParameters().get("Watcher");
            GlobalLogWriter.get().setWatcher(aWatcher);
        }
    }
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.