diff options
author | Pete Higgins <pete@peterhiggins.org> | 2020-06-16 15:18:56 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-06-23 10:45:12 -0700 |
commit | 16d828852c3b1f835bff936f6847a6e9ed04dde6 (patch) | |
tree | cd6cfc2db0ac8d2331cc261b7df0519515aa0dd4 | |
parent | 6aafc336aa49ce01dfa51ef74f0def0e6045afd1 (diff) | |
download | chef-16d828852c3b1f835bff936f6847a6e9ed04dde6.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) |