diff options
author | Pete Higgins <pete@peterhiggins.org> | 2020-06-16 15:18:56 -0700 |
---|---|---|
committer | Pete Higgins <pete@peterhiggins.org> | 2020-06-16 16:37:16 -0700 |
commit | 7bb7b10db4c96f816139309a220afb7f7e581297 (patch) | |
tree | 8a8c12d44c02eeee8c25a229fa975a68bf6ef229 | |
parent | 1d7a668841a51f6d46544205d126b83b8d4bdb27 (diff) | |
download | chef-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.rb | 9 |
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) |