diff options
author | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2019-03-26 18:01:45 +0100 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2019-03-26 18:02:28 +0100 |
commit | 7ba6fbef28e5cc59b4cd993a836b9f5a4ae34110 (patch) | |
tree | 94af096234189c2f261c16e2cc8b66a4408e3e8f /logserver/src/test/java/com | |
parent | dc46e712efefb2324869a1abf7baac198b33778e (diff) |
Remove unused log formatters from logserver
Diffstat (limited to 'logserver/src/test/java/com')
3 files changed, 0 insertions, 115 deletions
diff --git a/logserver/src/test/java/com/yahoo/logserver/formatter/test/LogFormatterManagerTestCase.java b/logserver/src/test/java/com/yahoo/logserver/formatter/test/LogFormatterManagerTestCase.java deleted file mode 100644 index ece21fbeca7..00000000000 --- a/logserver/src/test/java/com/yahoo/logserver/formatter/test/LogFormatterManagerTestCase.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -/* - * $Id$ - * - */ -package com.yahoo.logserver.formatter.test; - -import com.yahoo.logserver.formatter.LogFormatter; -import com.yahoo.logserver.formatter.LogFormatterManager; -import com.yahoo.logserver.formatter.NullFormatter; -import com.yahoo.logserver.formatter.TextFormatter; - -import org.junit.*; - -import static org.junit.Assert.*; - -/** - * Test the LogFormatterManager - * - * @author Bjorn Borud - */ -public class LogFormatterManagerTestCase { - - /** - * Ensure the system formatters are present - */ - @Test - public void testSystemFormatters() { - LogFormatter lf = LogFormatterManager.getLogFormatter("system.textformatter"); - assertNotNull(lf); - assertEquals(TextFormatter.class, lf.getClass()); - - lf = LogFormatterManager.getLogFormatter("system.nullformatter"); - assertNotNull(lf); - assertEquals(NullFormatter.class, lf.getClass()); - } -} diff --git a/logserver/src/test/java/com/yahoo/logserver/formatter/test/NullFormatterTestCase.java b/logserver/src/test/java/com/yahoo/logserver/formatter/test/NullFormatterTestCase.java deleted file mode 100644 index a2582e80754..00000000000 --- a/logserver/src/test/java/com/yahoo/logserver/formatter/test/NullFormatterTestCase.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -/* - * $Id$ - * - */ -package com.yahoo.logserver.formatter.test; - -import com.yahoo.log.LogMessage; -import com.yahoo.logserver.formatter.NullFormatter; -import com.yahoo.logserver.test.MockLogEntries; - -import org.junit.*; - -import static org.junit.Assert.*; - -/** - * Test the NullFormatter - * - * @author Bjorn Borud - */ -public class NullFormatterTestCase { - - @Test - public void testNullFormatter() { - NullFormatter nf = new NullFormatter(); - LogMessage[] ms = MockLogEntries.getMessages(); - for (LogMessage m : ms) { - assertEquals(m.toString(), nf.format(m)); - } - } -} diff --git a/logserver/src/test/java/com/yahoo/logserver/formatter/test/TextFormatterTestCase.java b/logserver/src/test/java/com/yahoo/logserver/formatter/test/TextFormatterTestCase.java deleted file mode 100644 index aee3932fa06..00000000000 --- a/logserver/src/test/java/com/yahoo/logserver/formatter/test/TextFormatterTestCase.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -/* - * $Id$ - * - */ -package com.yahoo.logserver.formatter.test; - -import com.yahoo.log.InvalidLogFormatException; -import com.yahoo.log.LogMessage; -import com.yahoo.logserver.formatter.TextFormatter; -import com.yahoo.logserver.test.MockLogEntries; - -import org.junit.*; - -import static org.junit.Assert.*; - -/** - * Test the TextFormatter - * - * @author Bjorn Borud - */ -public class TextFormatterTestCase { - - /** - * Just simple test to make sure it doesn't die on us - */ - @Test - public void testTextFormatter() { - TextFormatter tf = new TextFormatter(); - LogMessage[] ms = MockLogEntries.getMessages(); - for (int i = 0; i < ms.length; i++) { - System.out.println(tf.format(ms[i])); - } - } - - /** - * Test that a specific log message is formatted correctly - */ - @Test - public void testSpecificMessage() throws InvalidLogFormatException { - String l = "1115200798.195568\texample.yahoo.com\t65819\ttopleveldispatch\tfdispatch.queryperf\tevent\tvalue/1 name=\"query_eval_time_avg_s\" value=0.0229635972697721825"; - String result = "2005-05-04 09:59:58 example.yahoo.com 65819 topleveldispatch fdispatch.queryperf EVENT value/1 name=\"query_eval_time_avg_s\" value=0.0229635972697721825\n"; - LogMessage m = LogMessage.parseNativeFormat(l); - TextFormatter tf = new TextFormatter(); - assertEquals(result, tf.format(m)); - } -} |