use of com.google.cloud.bigquery.JobInfo in project google-cloud-java by GoogleCloudPlatform.
the class ITJobSnippets method testWaitForWithOptions.
@Test
public void testWaitForWithOptions() throws Exception {
JobConfiguration jobConfig = QueryJobConfiguration.newBuilder(QUERY).setUseLegacySql(false).build();
JobInfo jobInfo = JobInfo.newBuilder(jobConfig).build();
Job job = bigquery.create(jobInfo);
JobSnippets jobSnippets = new JobSnippets(job);
boolean result = jobSnippets.waitForWithOptions();
assertTrue(result);
}
use of com.google.cloud.bigquery.JobInfo in project google-cloud-java by GoogleCloudPlatform.
the class ITJobSnippets method testReloadStatus.
@Test
public void testReloadStatus() throws Exception {
JobConfiguration jobConfig = QueryJobConfiguration.newBuilder(QUERY).setUseLegacySql(false).build();
JobInfo jobInfo = JobInfo.newBuilder(jobConfig).build();
Job job = bigquery.create(jobInfo);
JobSnippets jobSnippets = new JobSnippets(job);
JobStatus.State result = jobSnippets.reloadStatus();
assertEquals(JobStatus.State.DONE, result);
}
use of com.google.cloud.bigquery.JobInfo in project google-cloud-java by GoogleCloudPlatform.
the class ITJobSnippets method testReload.
@Test
public void testReload() throws Exception {
JobConfiguration jobConfig = QueryJobConfiguration.newBuilder(QUERY).setUseLegacySql(false).build();
JobInfo jobInfo = JobInfo.newBuilder(jobConfig).build();
Job job = bigquery.create(jobInfo);
JobSnippets jobSnippets = new JobSnippets(job);
JobStatus.State result = jobSnippets.reload();
assertEquals(JobStatus.State.DONE, result);
}
Aggregations