From b132d495268fc222bffdec1b94fef69cf5f1cc01 Mon Sep 17 00:00:00 2001 From: Seth Hollyman Date: Fri, 28 Jun 2019 13:40:38 -0700 Subject: [PATCH] bigquery: reduce test flakiness when testing job cancellation. 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. --- .../test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/google-cloud-clients/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java b/google-cloud-clients/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java index f2feffbaad73..7ce38134d5a5 100644 --- a/google-cloud-clients/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java +++ b/google-cloud-clients/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java @@ -1451,7 +1451,6 @@ public void testCancelJob() throws InterruptedException, TimeoutException { Job remoteJob = bigquery.create(JobInfo.of(configuration)); assertTrue(remoteJob.cancel()); remoteJob = remoteJob.waitFor(); - assertNull(remoteJob.getStatus().getError()); } @Test