private void echoTestSuiteDuration(boolean isParallel) { int testDuration = testSuite.getDurationSeconds(); if (testDuration > 0) { LOGGER.info(format("Running time per test: %s", secondsToHuman(testDuration))); int totalDuration = isParallel ? testDuration : testDuration * testSuite.size(); LOGGER.info(format("Testsuite will run until tests are finished for a maximum time of: %s", secondsToHuman(totalDuration))); } else { LOGGER.info("Testsuite will run until tests are finished"); } }
private void echoTestSuiteEnd(int testCount, long started) { LOGGER.info(HORIZONTAL_RULER); if (testCount == 1) { LOGGER.info(format("Finished running of test (%s)", secondsToHuman(getElapsedSeconds(started)))); } else { LOGGER.info(format("Finished running of %d tests (%s)", testCount, secondsToHuman(getElapsedSeconds(started)))); } LOGGER.info(HORIZONTAL_RULER); }
private void logProgress(TestPhase phase, long elapsedMs, long durationMs) { String msg; if (durationMs == Long.MAX_VALUE) { msg = format("%s %s", phase == RUN ? "Running" : "Warming up ", secondsToHuman(MILLISECONDS.toSeconds(elapsedMs))); } else { msg = format("%s %s (%s%%)", phase == RUN ? "Running" : "Warming up ", secondsToHuman(MILLISECONDS.toSeconds(elapsedMs)), formatPercentage(elapsedMs, durationMs)); } if (performanceMonitorIntervalSeconds > 0) { msg += performanceStatsCollector.formatIntervalPerformanceNumbers(testCase.getId()); } LOGGER.info(prefix + msg); }
private void logMissingWorkers(TestPhase testPhase, int completedWorkers, int expectedWorkers, long started) { long elapsed = getElapsedSeconds(started); if (elapsed % WAIT_FOR_PHASE_COMPLETION_LOG_INTERVAL_SECONDS != 0) { return; } if (elapsed < WAIT_FOR_PHASE_COMPLETION_LOG_VERBOSE_DELAY_SECONDS || completedWorkers == expectedWorkers) { echo(format("Waiting %s for %s completion (%d/%d workers)", secondsToHuman(elapsed), testPhase.desc(), completedWorkers, expectedWorkers)); return; } // verbose logging of missing workers List<SimulatorAddress> missingWorkers = new ArrayList<SimulatorAddress>(expectedWorkers - completedWorkers); if (expectedWorkers == 1) { missingWorkers.add(componentRegistry.getFirstWorker().getAddress()); } else { for (WorkerData worker : componentRegistry.getWorkers()) { if (!phaseCompletedMap.get(testPhase).contains(worker.getAddress())) { missingWorkers.add(worker.getAddress()); } } } echo(format("Waiting %s for %s completion (%d/%d workers) (missing workers: %s)", secondsToHuman(elapsed), testPhase.desc(), completedWorkers, expectedWorkers, missingWorkers)); }
} else { durationMs = SECONDS.toMillis(durationSeconds); echo(format("Test will %s for %s", phase.desc(), secondsToHuman(durationSeconds))); timeoutMs = startMs + durationMs;