From b3dd7a505549662d558eec550f210f0d6f0ec547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Grodzi=C5=84ska?= Date: Tue, 14 Jan 2020 21:53:53 +0100 Subject: Fix tests after value query change --- .../mimuw/cloudatlas/agent/modules/GossipGirlTest.java | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'src/test/java/pl/edu/mimuw/cloudatlas/agent/modules/GossipGirlTest.java') diff --git a/src/test/java/pl/edu/mimuw/cloudatlas/agent/modules/GossipGirlTest.java b/src/test/java/pl/edu/mimuw/cloudatlas/agent/modules/GossipGirlTest.java index dbacfe5..0a0042f 100644 --- a/src/test/java/pl/edu/mimuw/cloudatlas/agent/modules/GossipGirlTest.java +++ b/src/test/java/pl/edu/mimuw/cloudatlas/agent/modules/GossipGirlTest.java @@ -51,7 +51,7 @@ public class GossipGirlTest { private InitiateGossipMessage initiateGossipMessage; private ValueTime testTime; private ZMI initiatorHierarchy; - private Map> initiatorQueries; + private Map initiatorQueries; private StateMessage stateMessage; private NoCoTamMessage noCoTamMessage; private AttributesMessage attributesMessage1; @@ -170,10 +170,10 @@ public class GossipGirlTest { addQuery(initiatorQueries, "&query", "SELECT sum(foo) AS foo", testTime); } - public void addQuery(Map> queries, String name, String query, ValueTime timestamp) throws Exception { + public void addQuery(Map queries, String name, String query, ValueTime timestamp) throws Exception { queries.put( new Attribute(name), - new SimpleImmutableEntry(new ValueQuery(query), timestamp) + new ValueQuery(query, timestamp.getValue()) ); } @@ -291,10 +291,7 @@ public class GossipGirlTest { assertEquals(1, updateMessage2.getQueries().keySet().size()); assertThat(updateMessage2.getQueries().keySet(), hasItems(new Attribute("&one"))); assertEquals(updateMessage2.getQueries().get(new Attribute("&one")), - new SimpleImmutableEntry( - new ValueQuery("SELECT 3 AS one"), - ValueUtils.addToTime(testTime, 10) - ) + new ValueQuery("SELECT 3 AS one", ValueUtils.addToTime(testTime, 10).getValue()) ); gossipGirl.handleTyped(attributesMessage2); @@ -402,10 +399,7 @@ public class GossipGirlTest { assertEquals(1, updateMessage2.getQueries().keySet().size()); assertThat(updateMessage2.getQueries().keySet(), hasItems(new Attribute("&one"))); assertEquals(updateMessage2.getQueries().get(new Attribute("&one")), - new SimpleImmutableEntry( - new ValueQuery("SELECT 3 AS one"), - ValueUtils.addToTime(testTime, 10) - ) + new ValueQuery("SELECT 3 AS one", ValueUtils.addToTime(testTime, 10).getValue()) ); gossipGirl.handleTyped(attributesMessage2); -- cgit v1.2.3