From 237a7caa6971b67d6f98aa4f2aae3cbab7d86def Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Sat, 4 Jan 2020 16:18:22 +0100 Subject: Run queries on an interval --- .../java/pl/edu/mimuw/cloudatlas/agent/AgentIntegrationTest.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/test') diff --git a/src/test/java/pl/edu/mimuw/cloudatlas/agent/AgentIntegrationTest.java b/src/test/java/pl/edu/mimuw/cloudatlas/agent/AgentIntegrationTest.java index fcdfb47..62f7091 100644 --- a/src/test/java/pl/edu/mimuw/cloudatlas/agent/AgentIntegrationTest.java +++ b/src/test/java/pl/edu/mimuw/cloudatlas/agent/AgentIntegrationTest.java @@ -38,6 +38,8 @@ public class AgentIntegrationTest { private static Process registryProcess; private static Process agentProcess; + private static final long queriesInterval = 100; + private static Registry registry; private static Api api; @@ -118,9 +120,10 @@ public class AgentIntegrationTest { String name = "&query"; String queryCode = "SELECT 1 AS one"; api.installQuery(name, queryCode); - // TODO: test this eventually runs - // AttributesMap attributes = api.getZoneAttributeValues("/pjwstk"); - // assertEquals(new ValueInt(1l), attributes.get("one")); + + Thread.sleep(queriesInterval * 2); + AttributesMap attributes = api.getZoneAttributeValues("/pjwstk"); + assertEquals(new ValueInt(1l), attributes.getOrNull("one")); } @Test -- cgit v1.2.3