Skip to content

Fix WebHookService spec failing in Ruby 2.6

Stan Hu requested to merge sh-fix-web-hook-spec-ruby-2.6 into master

Ruby 2.6 changed Net::ReadTimeout#message to include the reason for the socket error (https://bugs.ruby-lang.org/issues/14832). However, WebHookService was failing in Ruby 2.6 because it expected Exception#message to match Exception#to_s, which isn't always the case. Fix this by just checking Exception#to_s.

Part of https://gitlab.com/gitlab-org/gitlab-ce/issues/57323

Edited by Stan Hu

Merge request reports