Package org.apache.aurora.gen

Examples of org.apache.aurora.gen.Response


    ScheduledTask task = new ScheduledTask()
        .setStatus(RUNNING)
        .setAssignedTask(
            new AssignedTask()
                .setTask(TASK_CONFIG.newBuilder()));
    Response response = new Response()
        .setResponseCode(OK)
        .setResult(Result.scheduleStatusResult(new ScheduleStatusResult()
            .setTasks(ImmutableList.of(task))));

    TaskQuery query = new TaskQuery()
        .setStatuses(ImmutableSet.of(RUNNING))
        .setTaskIds(ImmutableSet.of("a"));

    expect(thrift.getTasksStatus(query)).andReturn(response);

    replayAndStart();

    Response actualResponse = getRequestBuilder("/apibeta/getTasksStatus")
        .entity(ImmutableMap.of("query", query), MediaType.APPLICATION_JSON)
        .post(Response.class);
    assertEquals(response, actualResponse);
  }
View Full Code Here


    assertContentEncoding(post(path, body), Optional.of("gzip"));
  }

  @Test
  public void testGzipEncoding() throws Exception {
    expect(thrift.getJobSummary("www-data")).andReturn(new Response()).times(2);
    replayAndStart();

    assertGzipEncodedGet("/");
    assertGzipEncodedGet("/scheduler");
    assertGzipEncodedGet("/scheduler/");
View Full Code Here

TOP

Related Classes of org.apache.aurora.gen.Response

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.