com.google.appengine.api.taskqueue.dev.QueueStateInfo

Here are the examples of the java api class com.google.appengine.api.taskqueue.dev.QueueStateInfo taken from open source projects.

1. MetricsImplTest#testExport()

Project: domaintest
Source File: MetricsImplTest.java
View license
@Test
public void testExport() throws Exception {
    metrics.projectId = "project id";
    metrics.export();
    QueueStateInfo queueInfo = getLocalTaskQueue().getQueueStateInfo().get("default");
    assertEquals(1, queueInfo.getCountTasks());
    assertEquals("/task/metrics", queueInfo.getTaskInfo().get(0).getUrl());
    Multimap<String, String> params = parseQuery(queueInfo.getTaskInfo().get(0).getBody());
    assertEquals("/path", getOnlyElement(params.get("path")));
    assertEquals("tld", getOnlyElement(params.get("tld")));
    assertEquals("GET", getOnlyElement(params.get("method")));
    assertEquals("0", getOnlyElement(params.get("starttime")));
    assertEquals(ImmutableSet.of("foo", "bar"), ImmutableSet.copyOf(Splitter.on(' ').split(getOnlyElement(params.get("activity")))));
    assertEquals("456", getOnlyElement(params.get("responsecode")));
    assertTrue(params.containsKey("endtime"));
    assertTrue(params.containsKey("insertid"));
}