コード例 #1
0
 @VisibleForTesting
 static IJobUpdateQuery queryActiveByJob(IJobKey job) {
   return IJobUpdateQuery.build(
       new JobUpdateQuery()
           .setJobKey(job.newBuilder())
           .setUpdateStatuses(Updates.ACTIVE_JOB_UPDATE_STATES));
 }
コード例 #2
0
  @Test
  public void testGetJobUpdateSummaries() throws Exception {
    JobUpdateQuery query = new JobUpdateQuery().setRole(ROLE);
    List<JobUpdateSummary> summaries = createJobUpdateSummaries(5);
    expect(storageUtil.jobUpdateStore.fetchJobUpdateSummaries(IJobUpdateQuery.build(query)))
        .andReturn(IJobUpdateSummary.listFromBuilders(summaries));

    control.replay();

    Response response = assertOkResponse(thrift.getJobUpdateSummaries(query));
    assertEquals(
        summaries, response.getResult().getGetJobUpdateSummariesResult().getUpdateSummaries());
  }
コード例 #3
0
 @VisibleForTesting
 static IJobUpdateQuery queryByUpdate(IJobUpdateKey key) {
   return IJobUpdateQuery.build(new JobUpdateQuery().setKey(key.newBuilder()));
 }