diff options
author | Jon Marius Venstad <venstad@gmail.com> | 2020-12-10 13:17:44 +0100 |
---|---|---|
committer | Jon Marius Venstad <venstad@gmail.com> | 2020-12-10 13:17:44 +0100 |
commit | bf127fe126f7c6e3b7924bd64fabc955fccbc7c3 (patch) | |
tree | d190ba2cc8b7108f2c418da42f53e96a7ddbf6a9 /configserver/src/test/java | |
parent | 1e95ab58443cfe8065832aee7666a2dfbd2cfdd6 (diff) |
Use double progress [0, 1] instead of string
Diffstat (limited to 'configserver/src/test/java')
2 files changed, 5 insertions, 7 deletions
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/application/DefaultClusterReindexingStatusClientTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/application/DefaultClusterReindexingStatusClientTest.java index 82e1bd96373..7b8d5d9cc07 100644 --- a/configserver/src/test/java/com/yahoo/vespa/config/server/application/DefaultClusterReindexingStatusClientTest.java +++ b/configserver/src/test/java/com/yahoo/vespa/config/server/application/DefaultClusterReindexingStatusClientTest.java @@ -5,9 +5,7 @@ import com.yahoo.config.model.api.HostInfo; import com.yahoo.config.model.api.Model; import com.yahoo.config.model.api.PortInfo; import com.yahoo.config.model.api.ServiceInfo; -import com.yahoo.documentapi.ProgressToken; import com.yahoo.vespa.config.server.modelfactory.ModelResult; -import org.junit.Assert; import org.junit.Rule; import org.junit.Test; @@ -63,7 +61,7 @@ public class DefaultClusterReindexingStatusClientTest { " \"artist\": {" + " \"startedMillis\":50," + " \"endedMillis\":150," + - " \"progress\":\"half-done\"," + + " \"progress\": 0.5," + " \"state\": \"" + ClusterReindexing.State.SUCCESSFUL.asString() + "\"," + " \"message\":\"success\"" + " }" + @@ -84,7 +82,7 @@ public class DefaultClusterReindexingStatusClientTest { Instant.ofEpochMilli(150), ClusterReindexing.State.SUCCESSFUL, "success", - "half-done")))); + 0.5)))); Map<String, ClusterReindexing> result = client.getReindexingStatus(app); assertEquals(expected, result); } diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandlerTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandlerTest.java index 3ca21a46d12..f2558fa50b8 100644 --- a/configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandlerTest.java +++ b/configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandlerTest.java @@ -455,7 +455,7 @@ public class ApplicationHandlerTest { now.plusSeconds(2), ClusterReindexing.State.FAILED, "message", - "some"))); + 0.1))); assertJsonEquals(getRenderedString(new ReindexingResponse(applicationReindexing, Map.of("boo", clusterReindexing, "moo", clusterReindexing))), @@ -476,7 +476,7 @@ public class ApplicationHandlerTest { " \"endedMillis\": 125456,\n" + " \"state\": \"failed\",\n" + " \"message\": \"message\",\n" + - " \"progress\": \"some\"\n" + + " \"progress\": 0.1\n" + " }\n" + " }\n" + " },\n" + @@ -498,7 +498,7 @@ public class ApplicationHandlerTest { " \"endedMillis\": 125456,\n" + " \"state\": \"failed\",\n" + " \"message\": \"message\",\n" + - " \"progress\": \"some\"\n" + + " \"progress\": 0.1\n" + " },\n" + " \"bax\": {\n" + " \"startedMillis\": 123456\n" + |