aboutsummaryrefslogtreecommitdiffstats
path: root/vespalog/src/test/java/com/yahoo/log/VespaFormatterTestCase.java
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@verizonmedia.com>2022-06-02 13:09:44 +0200
committergjoranv <gv@verizonmedia.com>2022-06-08 11:45:25 +0200
commit301f5ab47fdad02c3fa019d811d25a31f6119013 (patch)
treee289eaf92bf0ae42eaffd167535845c6f8378790 /vespalog/src/test/java/com/yahoo/log/VespaFormatterTestCase.java
parentabe8c9d405055c6582874c56e7802fc11581bc31 (diff)
Remove deprecated members from vespalog
Diffstat (limited to 'vespalog/src/test/java/com/yahoo/log/VespaFormatterTestCase.java')
-rw-r--r--vespalog/src/test/java/com/yahoo/log/VespaFormatterTestCase.java41
1 files changed, 0 insertions, 41 deletions
diff --git a/vespalog/src/test/java/com/yahoo/log/VespaFormatterTestCase.java b/vespalog/src/test/java/com/yahoo/log/VespaFormatterTestCase.java
index 859e644c419..eb8656aaea9 100644
--- a/vespalog/src/test/java/com/yahoo/log/VespaFormatterTestCase.java
+++ b/vespalog/src/test/java/com/yahoo/log/VespaFormatterTestCase.java
@@ -228,45 +228,4 @@ public class VespaFormatterTestCase {
assertTrue(formatter.format(r).contains("meldingen her"));
}
- /**
- * This test doesn't really do that much. It is just here
- * to ensure this doesn't crash. XXX TODO: make this test
- * actually test something more than just the non-generation
- * of runtime errors. -bb
- */
- @Test
- @SuppressWarnings("removal") // for VespaFormat.formatException
- public void testExceptionFormatting () {
- StringBuilder sb = new StringBuilder(128);
- Exception e = new Exception("testing", new Exception("nested"));
- VespaFormat.formatException(e, sb);
- }
-
-
- @Test
- @SuppressWarnings("removal")
- public void testGeneralFormat() { // for VespaFormat.format
- String[] expected = new String[] {
- "54.321000",
- "hostname",
- "26019/UnitTest-Thread-37",
- "UnitTestRunner",
- "com.UnitTest",
- "INFO",
- "Just check it looks OK\\nmsg=\"boom\"\\nname=\"java.lang.Throwable\"\\nstack=\"\\n" + this.getClass().getName() // Clover rewrites class names, get the current one to avoid test failure
- };
- String formatted = VespaFormat.format("INFO",
- "UnitTest", "com", 54321L,
- "UnitTest-Thread-37", "UnitTestRunner",
- "Just check it looks OK",
- new Throwable("boom"));
- String[] split = formatted.split("\t");
- assertEquals(expected[0], split[0]);
- assertEquals(expected[2].split("/")[1], split[2].split("/")[1]);
- assertEquals(expected[3], split[3]);
- assertEquals(expected[4], split[4]);
- assertEquals(expected[5], split[5]);
- assertEquals(expected[6], split[6].substring(0, expected[6].length()));
- assertEquals(expected.length, split.length);
- }
}