-
Bug
-
Resolution: Unresolved
-
Minor
-
None
Noticed it while creating tests in https://github.com/jenkinsci/gatling-plugin/pull/16 . "buildStartTime" is not as accurate as File modification time. In such case the comparison in https://github.com/jenkinsci/gatling-plugin/blob/master/src/main/java/io/gatling/jenkins/GatlingPublisher.java#L186 may return wrong value if the report file has been created when the build started
private List<FilePath> selectReports(List<FilePath> reportFolders) throws InterruptedException, IOException { long buildStartTime = run.getStartTimeInMillis(); List<FilePath> reportsFromThisBuild = new ArrayList<FilePath>(); for (FilePath reportFolder : reportFolders) { long reportLastMod = reportFolder.lastModified(); if (reportLastMod > buildStartTime) { logger.println("Adding report '" + reportFolder.getName() + "'"); reportsFromThisBuild.add(reportFolder); } } return reportsFromThisBuild; }