Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2019-09-30 20:21:10 +0300
committerisaacs <i@izs.me>2019-10-08 02:25:04 +0300
commit44a2b036b34324ec85943908264b2e36de5a9435 (patch)
tree15e719501072ca71ee3fda7c35103ce238596f7f /node_modules/node-gyp
parentdcff367a742257b00a21ad870ef370e4ecbd2f5d (diff)
fix root-ownership race conditions in meta-test
Currently all of our tests verify on teardown that there are no root-owned files in the cache. However, owing to some race conditions and slippery stream event deferral behavior that won't be fixed until v7, occasionally cacache's chown doesn't get processed until _after_ the promise resolves and the test ends. As a result, sometimes this check occurs before the chown has happened, resulting in flaky hard-to-reproduce failures. The somewhat-kludgey solution here is to move the ownership check from t.teardown to process.on('exit'). In npm v7, we should move it back to t.teardown, because we should never have a test that resolves in such a way as to leave the cache in an invalid state. PR-URL: https://github.com/npm/cli/pull/262 Credit: @isaacs Close: #262 Reviewed-by: @isaacs
Diffstat (limited to 'node_modules/node-gyp')
0 files changed, 0 insertions, 0 deletions