Skip to content

Commit

Permalink
fix NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
jloisel committed Jun 17, 2019
1 parent e9f1a3c commit 73f7ac3
Showing 1 changed file with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,31 +132,31 @@ private void runTest(
final String progress = String.format("[%.2f%%] ", results.getProgress(benchResult.getId()));
log.info(progress + nowStr + " - " + printable);
} else if (TERMINAL_STATES.contains(currentState)) {
buildDir.mkdirs();

if (isDownloadJUnitReports) {
junits.saveJUnitReport(buildDir, benchResult.getId());
}

if (isDownloadLogs) {
logs.downloadLogFiles(buildDir, benchResult.getId());
}

if (isDownloadJTLs) {
logs.downloadJtlFiles(buildDir, benchResult.getId());
}

benchResult = null;
log.info("Test finished with state: " + currentState);
break;
} else {
log.info("Preparing test.. (" + currentState + ")");
}
}

} finally {
ofNullable(benchResult)
.map(BenchResult::getId)
.ifPresent(results::stopTest);

buildDir.mkdirs();
if (isDownloadJUnitReports) {
junits.saveJUnitReport(buildDir, benchResult.getId());
}

if (isDownloadLogs) {
logs.downloadLogFiles(buildDir, benchResult.getId());
}

if (isDownloadJTLs) {
logs.downloadJtlFiles(buildDir, benchResult.getId());
}
}
}
}

0 comments on commit 73f7ac3

Please sign in to comment.