summaryrefslogtreecommitdiffstats
path: root/container-accesslogging/src/test/java/com/yahoo
diff options
context:
space:
mode:
authorFrode Lundgren <frodelu@yahoo-inc.com>2016-10-30 01:08:29 +0200
committerFrode Lundgren <frodelu@yahoo-inc.com>2016-10-30 01:08:29 +0200
commit9abe245c819f9405b162ca5bb7f38f04439ec042 (patch)
tree5a79bb273ba3b4a0b395842805e99c25e4b6d972 /container-accesslogging/src/test/java/com/yahoo
parent1775306b3024afbf99aadfb525d70777d53701b4 (diff)
Changes after code review [VESPA-5228]:
* Removed member variables; inlined assignments or create conversion methods * Pure numeric fields now written as JSON integers rather than strings
Diffstat (limited to 'container-accesslogging/src/test/java/com/yahoo')
-rw-r--r--container-accesslogging/src/test/java/com/yahoo/container/logging/JSONLogTestCase.java52
1 files changed, 26 insertions, 26 deletions
diff --git a/container-accesslogging/src/test/java/com/yahoo/container/logging/JSONLogTestCase.java b/container-accesslogging/src/test/java/com/yahoo/container/logging/JSONLogTestCase.java
index ff85dfb4835..f41e35243ad 100644
--- a/container-accesslogging/src/test/java/com/yahoo/container/logging/JSONLogTestCase.java
+++ b/container-accesslogging/src/test/java/com/yahoo/container/logging/JSONLogTestCase.java
@@ -40,11 +40,11 @@ public class JSONLogTestCase extends junit.framework.TestCase {
String expectedOutput =
"{\"ip\":\"152.200.54.243\"," +
"\"time\":\"920880005.123\"," +
- "\"duration\":\"122\"," +
- "\"size\":\"9875\"," +
- "\"code\":\"200\"," +
- "\"totalhits\":\"1234\"," +
- "\"hits\":\"0\"," +
+ "\"duration\":122," +
+ "\"size\":9875," +
+ "\"code\":200," +
+ "\"totalhits\":1234," +
+ "\"hits\":0," +
"\"method\":\"GET\"," +
"\"uri\":\"?query=test\"," +
"\"version\":\"HTTP/1.1\"," +
@@ -64,11 +64,11 @@ public class JSONLogTestCase extends junit.framework.TestCase {
String expectedOutput =
"{\"ip\":\"152.200.54.243\"," +
"\"time\":\"920880005.123\"," +
- "\"duration\":\"122\"," +
- "\"size\":\"9875\"," +
- "\"code\":\"200\"," +
- "\"totalhits\":\"1234\"," +
- "\"hits\":\"0\"," +
+ "\"duration\":122," +
+ "\"size\":9875," +
+ "\"code\":200," +
+ "\"totalhits\":1234," +
+ "\"hits\":0," +
"\"method\":\"GET\"," +
"\"uri\":\"?query=test\"," +
"\"version\":\"HTTP/1.1\"," +
@@ -92,11 +92,11 @@ public class JSONLogTestCase extends junit.framework.TestCase {
String expectedOutput =
"{\"ip\":\"152.200.54.243\"," +
"\"time\":\"920880005.123\"," +
- "\"duration\":\"122\"," +
- "\"size\":\"9875\"," +
- "\"code\":\"200\"," +
- "\"totalhits\":\"1234\"," +
- "\"hits\":\"0\"," +
+ "\"duration\":122," +
+ "\"size\":9875," +
+ "\"code\":200," +
+ "\"totalhits\":1234," +
+ "\"hits\":0," +
"\"method\":\"GET\"," +
"\"uri\":\"?query=test\"," +
"\"version\":\"HTTP/1.1\"," +
@@ -113,18 +113,18 @@ public class JSONLogTestCase extends junit.framework.TestCase {
expectedOutput =
"{\"ip\":\"152.200.54.243\"," +
"\"time\":\"920880005.123\"," +
- "\"duration\":\"122\"," +
- "\"size\":\"9875\"," +
- "\"code\":\"200\"," +
- "\"totalhits\":\"1234\"," +
- "\"hits\":\"0\"," +
+ "\"duration\":122," +
+ "\"size\":9875," +
+ "\"code\":200," +
+ "\"totalhits\":1234," +
+ "\"hits\":0," +
"\"method\":\"GET\"," +
"\"uri\":\"?query=test\"," +
"\"version\":\"HTTP/1.1\"," +
"\"agent\":\"Mozilla/4.05 [en] (Win95; I)\"," +
"\"host\":\"localhost\"," +
"\"remoteaddr\":\"FE80:0000:0000:0000:0202:B3FF:FE1E:8329\"," +
- "\"remoteport\":\"1234\"" +
+ "\"remoteport\":1234" +
"}";
assertEquals(expectedOutput, new JSONFormatter(entry).format());
@@ -155,11 +155,11 @@ public class JSONLogTestCase extends junit.framework.TestCase {
String expectedOutput =
"{\"ip\":\"152.200.54.243\"," +
"\"time\":\"920880005.123\"," +
- "\"duration\":\"122\"," +
- "\"size\":\"9875\"," +
- "\"code\":\"200\"," +
- "\"totalhits\":\"1234\"," +
- "\"hits\":\"0\"," +
+ "\"duration\":122," +
+ "\"size\":9875," +
+ "\"code\":200," +
+ "\"totalhits\":1234," +
+ "\"hits\":0," +
"\"method\":\"GET\"," +
"\"uri\":\"?query=test\"," +
"\"version\":\"HTTP/1.1\"," +