aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-04-29 22:31:55 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2019-04-29 22:31:55 -0700
commit238f5d9b8b9e4819a9909a7403dcbc7bec0dc714 (patch)
tree883a7f71551876b5161857d73a9f428b3227f3b1 /src/test/java/org
parent35b902cd59070a7185d99640851b99798a0d1eb7 (diff)
downloadtraccar-server-238f5d9b8b9e4819a9909a7403dcbc7bec0dc714.tar.gz
traccar-server-238f5d9b8b9e4819a9909a7403dcbc7bec0dc714.tar.bz2
traccar-server-238f5d9b8b9e4819a9909a7403dcbc7bec0dc714.zip
Log exception root cause
Diffstat (limited to 'src/test/java/org')
-rw-r--r--src/test/java/org/traccar/helper/LogTest.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/test/java/org/traccar/helper/LogTest.java b/src/test/java/org/traccar/helper/LogTest.java
index 853eb05c9..ef33c32ba 100644
--- a/src/test/java/org/traccar/helper/LogTest.java
+++ b/src/test/java/org/traccar/helper/LogTest.java
@@ -7,8 +7,17 @@ import static org.junit.Assert.assertEquals;
public class LogTest {
@Test
- public void testLog() {
- assertEquals("test - Exception (LogTest:11 < ...)", Log.exceptionStack(new Exception("test")));
+ public void testExceptionStack() {
+ assertEquals(
+ "test - Exception (LogTest:11 < ...)",
+ Log.exceptionStack(new Exception("test")));
+ }
+
+ @Test
+ public void testExceptionStackRootCause() {
+ assertEquals(
+ "root - Exception (LogTest:18 < ...)",
+ Log.exceptionStack(new Exception("test", new Exception("root"))));
}
}