Skip to content

Commit d0b16af

Browse files
authored
bigquery: reduce test flakiness when testing job cancellation. (#5592)
BigQuery's cancellation mechanism is best-effort notification to the job server running cancellation. Depending on a timing factors, the cancellation can be ignored, arrive after job completion, or arrive in time to trigger state transition (which will yield an error). This change removes the expectation that cancelling a job won't yield an error, which is incorrect for the last case.
1 parent b8eeb60 commit d0b16af

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

  • google-cloud-clients/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it

google-cloud-clients/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1451,7 +1451,6 @@ public void testCancelJob() throws InterruptedException, TimeoutException {
14511451
Job remoteJob = bigquery.create(JobInfo.of(configuration));
14521452
assertTrue(remoteJob.cancel());
14531453
remoteJob = remoteJob.waitFor();
1454-
assertNull(remoteJob.getStatus().getError());
14551454
}
14561455

14571456
@Test

0 commit comments

Comments
 (0)