Package betsy.common.util

Examples of betsy.common.util.Progress


    protected static void log(Path path, Runnable closure) {
        LogUtil.log(path, LOGGER, closure);
    }

    public void execute() {
        final Progress progress = new Progress(testSuite.getProcessesCount());
        MDC.put("progress", progress.toString());

        // prepare test suite
        // MUST BE OUTSITE OF LOG -> as it deletes whole file tree
        FileTasks.deleteDirectory(testSuite.getPath());
        FileTasks.mkdirs(testSuite.getPath());

        log(testSuite.getPath(), () -> {
            // fail fast
            for (AbstractBPMNEngine engine : testSuite.getEngines()) {
                if (engine.isRunning()) {
                    throw new IllegalStateException("Engine " + engine.getName() + " is running");
                }
            }

            for (AbstractBPMNEngine engine : testSuite.getEngines()) {

                FileTasks.mkdirs(engine.getPath());

                log(engine.getPath(), () -> {
                    for (BPMNProcess process : engine.getProcesses()) {

                        progress.next();
                        MDC.put("progress", progress.toString());

                        executeProcess(process);
                    }
                });
            }
View Full Code Here


    protected static void log(Path path, Runnable closure) {
        LogUtil.log(path, LOGGER, closure);
    }

    public void execute() {
        final Progress progress = new Progress(testSuite.getProcessesCount());
        MDC.put("progress", progress.toString());

        // prepare test suite
        // MUST BE OUTSITE OF LOG -> as it deletes whole file tree
        FileTasks.deleteDirectory(testSuite.getPath());
        FileTasks.mkdirs(testSuite.getPath());

        log(testSuite.getPath(), () -> {

            // fail fast
            for (AbstractEngine engine : testSuite.getEngines()) {
                if (engine.isRunning()) {
                    throw new IllegalStateException("Engine " + engine + " is running");
                }
            }

            for (AbstractEngine engine : testSuite.getEngines()) {
                FileTasks.mkdirs(engine.getPath());

                log(engine.getPath(), () -> {
                    for (BPELProcess process : engine.getProcesses()) {

                        progress.next();
                        MDC.put("progress", progress.toString());

                        executeProcess(process);
                    }

                });
View Full Code Here

TOP

Related Classes of betsy.common.util.Progress

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.