Skip to content
This repository was archived by the owner on Feb 7, 2026. It is now read-only.

test: parallel tests can error on already deleted dataset#1214

Merged
alvarowolfx merged 4 commits intogoogleapis:mainfrom
alvarowolfx:improve-dataset-sample-test
Jun 2, 2023
Merged

test: parallel tests can error on already deleted dataset#1214
alvarowolfx merged 4 commits intogoogleapis:mainfrom
alvarowolfx:improve-dataset-sample-test

Conversation

@alvarowolfx
Copy link
Copy Markdown
Contributor

samples-test fail sometimes when datasets were already deleted by another process ( in this case system tests ) running in parallel.

Example:
build #703

@alvarowolfx alvarowolfx requested review from a team, chalmerlowe and ruyadorno June 1, 2023 21:12
@product-auto-label product-auto-label Bot added size: s Pull request size is small. api: bigquery Issues related to the googleapis/nodejs-bigquery API. labels Jun 1, 2023
@alvarowolfx alvarowolfx added kokoro:run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. and removed api: bigquery Issues related to the googleapis/nodejs-bigquery API. labels Jun 1, 2023
@gcf-owl-bot gcf-owl-bot Bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 1, 2023
@yoshi-kokoro yoshi-kokoro removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Jun 1, 2023
@alvarowolfx alvarowolfx added the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 1, 2023
@gcf-owl-bot gcf-owl-bot Bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 1, 2023
@alvarowolfx alvarowolfx added kokoro:run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels Jun 1, 2023
@gcf-owl-bot gcf-owl-bot Bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 1, 2023
@product-auto-label product-auto-label Bot added the api: bigquery Issues related to the googleapis/nodejs-bigquery API. label Jun 2, 2023
@alvarowolfx alvarowolfx added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 2, 2023
@yoshi-kokoro yoshi-kokoro removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jun 2, 2023
Copy link
Copy Markdown

@ruyadorno ruyadorno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of turning the try/catch expression into a catch-all block, it's better to leave the previous try/catch block as-is and add a new one that covers specifically the metadata retrieval which seems to be failing, e.g:

+      try {
        const [metadata] = await dataset.getMetadata();
+      } catch (e) {
+        console.log(`failed to retrieve dataset(${dataset.id})`);
+        console.log(e);
+.       return;
+      }

This way, the intention and the unexpected nature of these failures are better documented for future readers.

@ruyadorno

This comment was marked as outdated.

Comment thread samples/test/datasets.test.js Outdated
@alvarowolfx alvarowolfx added the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 2, 2023
@gcf-owl-bot gcf-owl-bot Bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 2, 2023
@alvarowolfx alvarowolfx added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 2, 2023
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 2, 2023
@alvarowolfx alvarowolfx added the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 2, 2023
@gcf-owl-bot gcf-owl-bot Bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 2, 2023
@alvarowolfx alvarowolfx merged commit 7f41334 into googleapis:main Jun 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: bigquery Issues related to the googleapis/nodejs-bigquery API. size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants