diff options
author | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2019-03-26 17:20:55 +0100 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2019-03-26 18:30:27 +0100 |
commit | e73dcf4a2fc8e819824a8a0035c220f2f4dd4e47 (patch) | |
tree | 2c65e586ce69c65b19c21076273361ff44898e0b /logserver | |
parent | d7649dc2fa83ae8d3ffb73a7324c4637d95b0f1d (diff) |
Expose threadId and processId from LogMessage
Diffstat (limited to 'logserver')
-rw-r--r-- | logserver/src/test/java/com/yahoo/logserver/handlers/archive/ArchiverHandlerTestCase.java | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/logserver/src/test/java/com/yahoo/logserver/handlers/archive/ArchiverHandlerTestCase.java b/logserver/src/test/java/com/yahoo/logserver/handlers/archive/ArchiverHandlerTestCase.java index e4904728d9c..525d02c4298 100644 --- a/logserver/src/test/java/com/yahoo/logserver/handlers/archive/ArchiverHandlerTestCase.java +++ b/logserver/src/test/java/com/yahoo/logserver/handlers/archive/ArchiverHandlerTestCase.java @@ -1,6 +1,14 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.logserver.handlers.archive; +import com.yahoo.io.IOUtils; +import com.yahoo.log.InvalidLogFormatException; +import com.yahoo.log.LogMessage; +import com.yahoo.plugin.SystemPropertyConfig; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TemporaryFolder; + import java.io.BufferedReader; import java.io.File; import java.io.FileReader; @@ -10,15 +18,9 @@ import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; -import com.yahoo.io.IOUtils; -import com.yahoo.log.InvalidLogFormatException; -import com.yahoo.log.LogMessage; -import com.yahoo.plugin.SystemPropertyConfig; - -import org.junit.*; -import org.junit.rules.TemporaryFolder; - -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; /** * @author Bjorn Borud @@ -85,8 +87,8 @@ public class ArchiverHandlerTestCase { try { ArchiverHandler a = new ArchiverHandler(tmpDir.getAbsolutePath(), 1024); - LogMessage msg1 = LogMessage.parseNativeFormat("1139322725\thost\tthread\tservice\tcomponent\tinfo\tpayload"); - LogMessage msg2 = LogMessage.parseNativeFormat("1161172200\thost\tthread\tservice\tcomponent\tinfo\tpayload"); + LogMessage msg1 = LogMessage.parseNativeFormat("1139322725\thost\t1/1\tservice\tcomponent\tinfo\tpayload"); + LogMessage msg2 = LogMessage.parseNativeFormat("1161172200\thost\t1/1\tservice\tcomponent\tinfo\tpayload"); assertEquals(tmpDir.getAbsolutePath() + "/2006/02/07/14", a.getPrefix(msg1)); assertEquals(tmpDir.getAbsolutePath() + "/2006/10/18/11", a.getPrefix(msg2)); assertEquals(a.getPrefix(msg1).length(), a.getPrefix(msg2).length()); |