diff options
| author | Martin Ritchie <ritchiem@apache.org> | 2009-08-07 18:05:57 +0000 |
|---|---|---|
| committer | Martin Ritchie <ritchiem@apache.org> | 2009-08-07 18:05:57 +0000 |
| commit | 25e2f3796aa30a34d6231c4448968d903dde75b9 (patch) | |
| tree | 71404f434f67e7ebfd5dd08619a93356269ba001 /java | |
| parent | 9689b23eeab149a2642ccc43e5691f701b72a480 (diff) | |
| download | qpid-python-25e2f3796aa30a34d6231c4448968d903dde75b9.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/qpid@802116 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
| -rw-r--r-- | java/systests/src/main/java/org/apache/qpid/util/LogMonitor.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/java/systests/src/main/java/org/apache/qpid/util/LogMonitor.java b/java/systests/src/main/java/org/apache/qpid/util/LogMonitor.java index 7a045fdb9a..df8dd0b85b 100644 --- a/java/systests/src/main/java/org/apache/qpid/util/LogMonitor.java +++ b/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() { |
