private boolean hasToWait()

in gepard-core/src/main/java/com/epam/gepard/common/helper/ResultCollector.java [61:83]


    private boolean hasToWait(final AllTestResults allTestResults, final TestClassExecutionData executionData, final LogFileWriter htmlLog,
            final LogFileWriter csvLog) throws InterruptedException {
        boolean result = true;
        if (executionData.getLock() >= 0) { //need wait
            String s = executionData.getSysOut();
            if (s.length() > 0) { // if there is a meaning to write it out...
                CONSOLE_LOG.info(s);
            }
            Thread.sleep(GepardConstants.ONE_SECOND_LENGTH.getConstant()); //wait for a sec
        } else { //lock is -1, Test Class is ready, flush the result
            flushTestResult(executionData, odd, htmlLog, csvLog);
            //collect suite level results
            allTestResults.increaseRunned(executionData.getRunned());
            allTestResults.increasePassed(executionData.getCountPassed());
            allTestResults.increaseFailed(executionData.getCountFailed());
            allTestResults.increaseNotApplicable(executionData.getCountNA());
            allTestResults.increaseDummy(executionData.getCountDummy());
            //finalize the row
            odd = !odd; //change the odd/even html output marker
            result = false;
        }
        return result;
    }