diff options
author | Tim Smith <tsmith@chef.io> | 2020-06-16 16:49:20 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-16 16:49:20 -0700 |
commit | bca4f0622158d7692ccb9b07ca2a5d76db58ddfe (patch) | |
tree | 2f8e21cd01b6d5eea2856e158b7029f25ce328c5 | |
parent | 8415abfd29efa28f106bf7e43cde00268b3222f9 (diff) | |
parent | 7bb7b10db4c96f816139309a220afb7f7e581297 (diff) | |
download | chef-bca4f0622158d7692ccb9b07ca2a5d76db58ddfe.tar.gz |
Merge pull request #10005 from chef/fix-thread-exception-in-test
Silence exception output in threaded test.
-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) |