GoogleCloudPlatform / gcsfuse

A user-space file system for interacting with Google Cloud Storage
https://cloud.google.com/storage/docs/gcs-fuse
Apache License 2.0
2k stars 413 forks source link

Fix race in test #2067

Closed kislaykishore closed 1 week ago

kislaykishore commented 1 week ago

Shadow the tc variable so that different subtests refer to their corresponding tc.

It's have been fine had the subtests ran sequentially but in a parallel run, different tests sharing the same tc variable can lead to race.

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 72.00%. Comparing base (3f8314a) to head (e439958).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2067 +/- ## ======================================= Coverage 71.99% 72.00% ======================================= Files 99 99 Lines 10870 10870 ======================================= + Hits 7826 7827 +1 + Misses 2712 2711 -1 Partials 332 332 ``` | [Flag](https://app.codecov.io/gh/GoogleCloudPlatform/gcsfuse/pull/2067/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GoogleCloudPlatform) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/GoogleCloudPlatform/gcsfuse/pull/2067/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GoogleCloudPlatform) | `72.00% <ø> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GoogleCloudPlatform#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.