Skip to content

Commit

Permalink
fix: wait for job finish before deletion (#1071)
Browse files Browse the repository at this point in the history
Co-authored-by: meredithslota <meredithslota@google.com>
  • Loading branch information
shollyman and meredithslota committed Feb 1, 2022
1 parent ab55564 commit 5b77718
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions system-test/bigquery.ts
Expand Up @@ -660,6 +660,9 @@ describe('BigQuery', () => {
};

const [job] = await bigquery.createJob(opts);
// Job must finish before we can delete. Wait for results.
await job.getQueryResults();

const [resp] = await job.delete();
const [exists] = await job.exists();
assert.deepStrictEqual(resp, {});
Expand Down

0 comments on commit 5b77718

Please sign in to comment.