LUCENE-6564: Add milliseconds to timestamp in IW output for tests

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1685431 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ramkumar Aiyengar 2015-06-14 18:11:23 +00:00
parent 5438754ac1
commit e2a1ee29e0
3 changed files with 5 additions and 3 deletions

View File

@ -148,6 +148,9 @@ Build
* LUCENE-6518: Don't report false thread leaks from IBM J9
ClassCache Reaper in test framework. (Dawid Weiss)
* LUCENE-6564: Add milliseconds to timestamp in InfoStream output for tests
(Ramkumar Aiyengar)
======================= Lucene 5.2.1 =======================
Bug Fixes

View File

@ -36,7 +36,7 @@ public class PrintStreamInfoStream extends InfoStream {
private static final AtomicInteger MESSAGE_ID = new AtomicInteger();
protected final int messageID;
private static final DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS", Locale.ROOT);
protected static final DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS", Locale.ROOT);
protected final PrintStream stream;

View File

@ -23,7 +23,6 @@ import java.util.Date;
import java.util.HashSet;
import java.util.Locale;
import java.util.Random;
import java.util.Set;
import java.util.TimeZone;
import org.apache.lucene.codecs.Codec;
@ -99,7 +98,7 @@ final class TestRuleSetupAndRestoreClassEnv extends AbstractBeforeAfterRule {
} else {
name = Thread.currentThread().getName();
}
stream.println(component + " " + messageID + " [" + new Date() + "; " + name + "]: " + message);
stream.println(component + " " + messageID + " [" + dateFormat.format(new Date()) + "; " + name + "]: " + message);
}
}