@Override public Boolean call() { return bigQueryRpc.cancel( completeJobId.getProject(), completeJobId.getJob(), completeJobId.getLocation()); } },
@Test public void testCancelJob() { EasyMock.expect(bigqueryRpcMock.cancel(PROJECT, JOB, null)).andReturn(true); EasyMock.replay(bigqueryRpcMock); bigquery = options.getService(); assertTrue(bigquery.cancel(JOB)); }
@Test public void testCancelJobFromJobId() { EasyMock.expect(bigqueryRpcMock.cancel(PROJECT, JOB, null)).andReturn(true); EasyMock.replay(bigqueryRpcMock); bigquery = options.getService(); assertTrue(bigquery.cancel(JobId.of(PROJECT, JOB))); }
@Test public void testCancelJobFromJobIdWithProject() { JobId jobId = JobId.of(OTHER_PROJECT, JOB); EasyMock.expect(bigqueryRpcMock.cancel(OTHER_PROJECT, JOB, null)).andReturn(true); EasyMock.replay(bigqueryRpcMock); bigquery = options.getService(); assertTrue(bigquery.cancel(jobId)); }
@Override public Boolean call() { return bigQueryRpc.cancel( completeJobId.getProject(), completeJobId.getJob(), completeJobId.getLocation()); } },