aboutsummaryrefslogtreecommitdiffstats
path: root/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/persistence/LogSerializerTest.java
diff options
context:
space:
mode:
authorJon Marius Venstad <jvenstad@yahoo-inc.com>2018-08-27 09:47:04 +0200
committerJon Marius Venstad <jvenstad@yahoo-inc.com>2018-08-27 09:47:13 +0200
commit29e4016ae5dcf47dc248b59e159fda7d473d204a (patch)
tree7c8da96318e4a2296a9084c40b7b732cce253f3b /controller-server/src/test/java/com/yahoo/vespa/hosted/controller/persistence/LogSerializerTest.java
parent73ed7ad7c3cbd41d5ca44c4f2f7ae547fe4c5abe (diff)
Replace log entry levels with types
Diffstat (limited to 'controller-server/src/test/java/com/yahoo/vespa/hosted/controller/persistence/LogSerializerTest.java')
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/persistence/LogSerializerTest.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/persistence/LogSerializerTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/persistence/LogSerializerTest.java
index 64aaec97b09..ac3308c242c 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/persistence/LogSerializerTest.java
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/persistence/LogSerializerTest.java
@@ -1,6 +1,5 @@
package com.yahoo.vespa.hosted.controller.persistence;
-import com.yahoo.log.LogLevel;
import com.yahoo.vespa.hosted.controller.api.integration.LogEntry;
import com.yahoo.vespa.hosted.controller.deployment.Step;
import org.junit.Test;
@@ -29,12 +28,15 @@ public class LogSerializerTest {
@Test
public void testSerialization() throws IOException {
+ for (LogEntry.Type type : LogEntry.Type.values())
+ assertEquals(type, LogSerializer.typeOf(LogSerializer.valueOf(type)));
+
byte[] logJson = Files.readAllBytes(logsFile);
- LogEntry first = new LogEntry(0, 0, LogLevel.INFO, "First");
- LogEntry second = new LogEntry(1, 0, LogLevel.INFO, "Second");
- LogEntry third = new LogEntry(2, 1000, LogLevel.DEBUG, "Third");
- LogEntry fourth = new LogEntry(3, 2000, LogLevel.WARNING, "Fourth");
+ LogEntry first = new LogEntry(0, 0, LogEntry.Type.info, "First");
+ LogEntry second = new LogEntry(1, 0, LogEntry.Type.info, "Second");
+ LogEntry third = new LogEntry(2, 1000, LogEntry.Type.debug, "Third");
+ LogEntry fourth = new LogEntry(3, 2000, LogEntry.Type.warning, "Fourth");
Map<Step, List<LogEntry>> expected = new HashMap<>();
expected.put(deployReal, new ArrayList<>());