summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Higgins <pete@peterhiggins.org>2020-06-16 15:18:56 -0700
committerPete Higgins <pete@peterhiggins.org>2020-06-16 16:37:16 -0700
commit7bb7b10db4c96f816139309a220afb7f7e581297 (patch)
tree8a8c12d44c02eeee8c25a229fa975a68bf6ef229
parent1d7a668841a51f6d46544205d126b83b8d4bdb27 (diff)
downloadchef-7bb7b10db4c96f816139309a220afb7f7e581297.tar.gz
Silence exception output in threaded test.
Signed-off-by: Pete Higgins <pete@peterhiggins.org>
-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)