summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2020-06-23 10:51:41 -0700
committerGitHub <noreply@github.com>2020-06-23 10:51:41 -0700
commite713a496e1bf6918fd043cfc26872beb6dbcbfbd (patch)
treecd6cfc2db0ac8d2331cc261b7df0519515aa0dd4
parent6aafc336aa49ce01dfa51ef74f0def0e6045afd1 (diff)
parent16d828852c3b1f835bff936f6847a6e9ed04dde6 (diff)
downloadchef-e713a496e1bf6918fd043cfc26872beb6dbcbfbd.tar.gz
Merge pull request #10043 from chef/quiet_tests_15
Silence exception output in threaded test.
-rw-r--r--spec/unit/util/threaded_job_queue_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/unit/util/threaded_job_queue_spec.rb b/spec/unit/util/threaded_job_queue_spec.rb
index de56bd0318..6925cb5dda 100644
--- a/spec/unit/util/threaded_job_queue_spec.rb
+++ b/spec/unit/util/threaded_job_queue_spec.rb
@@ -21,6 +21,15 @@ end
describe Chef::Util::ThreadedJobQueue do
let(:queue) { Chef::Util::ThreadedJobQueue.new }
+ around(:example) do |example|
+ old_value = Thread.report_on_exception
+ Thread.report_on_exception = false
+
+ example.run
+
+ Thread.report_on_exception = old_value
+ end
+
it "should pass mutex to jobs with an arity of 1" do
job = double
expect(job).to receive(:arity).at_least(:once).and_return(1)