From 8a2999bbdb2933257c954f51f135c5c3694e9afd Mon Sep 17 00:00:00 2001 From: Martin Ritchie Date: Fri, 7 Aug 2009 18:05:57 +0000 Subject: Update to LogMonitor to use channel truncation as the AlertingTest did previously. The current method can result in data log data loss and test failures. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@802116 13f79535-47bb-0310-9956-ffa450edef68 --- .../systests/src/main/java/org/apache/qpid/util/LogMonitor.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/util/LogMonitor.java b/qpid/java/systests/src/main/java/org/apache/qpid/util/LogMonitor.java index 7a045fdb9a..df8dd0b85b 100644 --- a/qpid/java/systests/src/main/java/org/apache/qpid/util/LogMonitor.java +++ b/qpid/java/systests/src/main/java/org/apache/qpid/util/LogMonitor.java @@ -172,9 +172,7 @@ public class LogMonitor */ public void reset() throws FileNotFoundException, IOException { - OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream(_logfile)); - writer.write("Log Monitor Reset\n"); - writer.close(); + new FileOutputStream(_logfile).getChannel().truncate(0); } /** @@ -183,7 +181,7 @@ public class LogMonitor * This is required to be called incase we added a new logger. * * If we don't call close then the new logger will continue to get log entries - * after our desired test has finished. + * after our desired test has finished. */ public void close() { -- cgit v1.2.1