From e54ac6aa794dc75d2f6b0aaaf8a09aa68bd6855d Mon Sep 17 00:00:00 2001 From: kohsuke Date: Tue, 7 Aug 2007 00:37:13 +0000 Subject: [PATCH] detect clock sync and report an error. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@4114 71c3de6d-444a-0410-be80-ed276b4c234a --- core/src/main/java/hudson/tasks/junit/TestResult.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/src/main/java/hudson/tasks/junit/TestResult.java b/core/src/main/java/hudson/tasks/junit/TestResult.java index be4febfc57..e07c976534 100644 --- a/core/src/main/java/hudson/tasks/junit/TestResult.java +++ b/core/src/main/java/hudson/tasks/junit/TestResult.java @@ -78,6 +78,13 @@ public final class TestResult extends MetaTabulatedResult { } if(!parsed) { + long localTime = System.currentTimeMillis(); + if(localTime < buildTime) + throw new AbortException( + "Clock on this slave is out of sync with the master, and therefore I" + + "can't figure out what test results are new and what are old." + + "Please keep the slave clock in sync with the master."); + File f = new File(baseDir,includedFiles[0]); throw new AbortException( String.format(