summaryrefslogtreecommitdiff
path: root/qpid/java
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2009-08-07 18:05:57 +0000
committerMartin Ritchie <ritchiem@apache.org>2009-08-07 18:05:57 +0000
commit8a2999bbdb2933257c954f51f135c5c3694e9afd (patch)
tree2a3e850d3137a9492a6468e0d0846627cd34d25f /qpid/java
parent44da29563f7de2df6b5553553ce415cdf753fbfe (diff)
downloadqpid-python-8a2999bbdb2933257c954f51f135c5c3694e9afd.tar.gz
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
Diffstat (limited to 'qpid/java')
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/util/LogMonitor.java6
1 files 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()
{