diff options
author | Marcin Chrzanowski <marcin.j.chrzanowski@gmail.com> | 2020-01-04 16:18:22 +0100 |
---|---|---|
committer | Marcin Chrzanowski <marcin.j.chrzanowski@gmail.com> | 2020-01-04 16:18:22 +0100 |
commit | 237a7caa6971b67d6f98aa4f2aae3cbab7d86def (patch) | |
tree | ed29d099f90c6fbbec9821dc0f28322a32504765 /src/test/java/pl/edu/mimuw/cloudatlas | |
parent | 9be545d6f2609d5fe8143a1964d44f6eee588ea2 (diff) |
Run queries on an interval
Diffstat (limited to 'src/test/java/pl/edu/mimuw/cloudatlas')
-rw-r--r-- | src/test/java/pl/edu/mimuw/cloudatlas/agent/AgentIntegrationTest.java | 9 |
1 files changed, 6 insertions, 3 deletions
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 |