summaryrefslogtreecommitdiff
path: root/spec/install/global_cache_spec.rb
diff options
context:
space:
mode:
authorBundlerbot <bot@bundler.io>2020-01-13 16:45:55 +0000
committerBundlerbot <bot@bundler.io>2020-01-13 16:45:55 +0000
commit6346c036a12cbae94c02bacb08c81a8fc5302238 (patch)
tree6beaf50a525af01f91c8f6eb2418be83c86ffda5 /spec/install/global_cache_spec.rb
parentcb96a16c9b7ffbb50c9929be7058ab1f4a552ca3 (diff)
parent104dbfbb1dd8fa2b32fe117c1ae1e4203e0665fe (diff)
downloadbundler-6346c036a12cbae94c02bacb08c81a8fc5302238.tar.gz
Merge #7569
7569: Load `CompactIndexClient` upfront during specs r=deivid-rodriguez a=deivid-rodriguez Thanks so much for the contribution! To make reviewing this PR a bit easier, please fill out answers to the following questions. ### What was the end-user problem that led to this PR? The problem was failing CI: https://github.com/rubygems/bundler/runs/386607433. ### What was your diagnosis of the problem? My diagnosis was that it could be caused by autoloading not being thread safe. The `CompactIndexClient` constant is autoloaded. If two parallel threads try to autoload the constant at the same time, it could happen that one of them sees the constant in an incomplete state (no `initialize` method defined yet). ### What is your fix for the problem, implemented in this PR? My fix is to load the constant upfront. ### Why did you choose this fix out of the possible options? I chose this fix because even if I could stop autoloading the constant, I don't want to touch code in `lib` at the moment just to fix a testing issue. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
Diffstat (limited to 'spec/install/global_cache_spec.rb')
0 files changed, 0 insertions, 0 deletions