changeset 1500:ff2313f0505a

Remove unused list of backend information in AgentInformation. Reviewed-by: neugens Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2014-August/010552.html
author Severin Gehwolf <sgehwolf@redhat.com>
date Thu, 21 Aug 2014 12:17:51 +0200
parents ec2da2dc1a60
children 914a5b12e044
files storage/core/src/main/java/com/redhat/thermostat/storage/model/AgentInformation.java web/common/src/test/java/com/redhat/thermostat/web/common/WebQueryResponseSerializerTest.java
diffstat 2 files changed, 3 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/storage/core/src/main/java/com/redhat/thermostat/storage/model/AgentInformation.java	Wed Aug 20 16:56:50 2014 -0400
+++ b/storage/core/src/main/java/com/redhat/thermostat/storage/model/AgentInformation.java	Thu Aug 21 12:17:51 2014 +0200
@@ -36,8 +36,6 @@
 
 package com.redhat.thermostat.storage.model;
 
-import java.util.ArrayList;
-import java.util.List;
 import java.util.Objects;
 
 import com.redhat.thermostat.storage.core.Entity;
@@ -52,9 +50,6 @@
     private boolean alive;
     private String address;
 
-    @SuppressWarnings("unused")
-    private List<BackendInformation> backends = new ArrayList<BackendInformation>();
-
     public AgentInformation() {
         this(null);
     }
--- a/web/common/src/test/java/com/redhat/thermostat/web/common/WebQueryResponseSerializerTest.java	Wed Aug 20 16:56:50 2014 -0400
+++ b/web/common/src/test/java/com/redhat/thermostat/web/common/WebQueryResponseSerializerTest.java	Thu Aug 21 12:17:51 2014 +0200
@@ -78,13 +78,13 @@
         response.setResponseCode(PreparedStatementResponseCode.ILLEGAL_PATCH);
         
         String jsonStr = gson.toJson(response);
-        String expectedJson = "{\"payload\":[{\"startTime\":0,\"stopTime\":0,\"alive\":false,\"backends\":[],\"agentId\":\"testing\"}],\"errno\":-1}";
+        String expectedJson = "{\"payload\":[{\"startTime\":0,\"stopTime\":0,\"alive\":false,\"agentId\":\"testing\"}],\"errno\":-1}";
         assertEquals(expectedJson, jsonStr);
     }
     
     @Test
     public void canDeserializeBasic() {
-        String rawJson = "{\"payload\":[{\"startTime\":0,\"stopTime\":0,\"alive\":true,\"backends\":[],\"agentId\":\"testing\"}],\"errno\":-1}";
+        String rawJson = "{\"payload\":[{\"startTime\":0,\"stopTime\":0,\"alive\":true,\"agentId\":\"testing\"}],\"errno\":-1}";
         Type queryResponseType = new TypeToken<WebQueryResponse<AgentInformation>>() {}.getType();
         WebQueryResponse<AgentInformation> actual = gson.fromJson(rawJson, queryResponseType);
         
@@ -142,7 +142,7 @@
         response.setResponseCode(PreparedStatementResponseCode.ILLEGAL_PATCH);
         
         String jsonStr = gson.toJson(response);
-        String expectedJson = "{\"payload\":[{\"startTime\":0,\"stopTime\":0,\"alive\":false,\"backends\":[],\"agentId\":\"testing\"}],\"errno\":-1}";
+        String expectedJson = "{\"payload\":[{\"startTime\":0,\"stopTime\":0,\"alive\":false,\"agentId\":\"testing\"}],\"errno\":-1}";
         assertEquals(expectedJson, jsonStr);
 
         // We need to tell GSON which parametrized type we want it to deserialize