diff options
-rw-r--r-- | spec/functional/resource/yum_package_spec.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/functional/resource/yum_package_spec.rb b/spec/functional/resource/yum_package_spec.rb index 7c5fc28fdf..5a9dbd44bc 100644 --- a/spec/functional/resource/yum_package_spec.rb +++ b/spec/functional/resource/yum_package_spec.rb @@ -43,10 +43,16 @@ describe Chef::Resource::YumPackage, :requires_root, external: exclude_test do expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match(version) end - before(:all) do + before(:suite) do shell_out!("yum -y install yum-utils") end + # XXX: this is necessary for RHEL6 due to a file descriptor leak so we need to bounce the + # python helper periodically before every top level context to get more FDs. + before(:all) do + Chef::Provider::Package::Yum::PythonHelper.instance.restart + end + before(:each) do # force errors to fail and not retry ENV["YUM_HELPER_NO_RETRIES"] = "true" |