Maintenance: Fixed timeout issue in ticket_trigger_test.rb.

This commit is contained in:
Martin Gruner 2022-02-11 08:19:43 +01:00
parent fcd49d7135
commit e6aec87df1

View file

@ -4,6 +4,11 @@ require 'test_helper'
class TicketTriggerTest < ActiveSupport::TestCase
processing_timeout = HtmlSanitizer.const_get(:PROCESSING_TIMEOUT)
# XSS processing may run into a timeout on slow CI systems, so turn the timeout off for the test.
HtmlSanitizer.const_set(:PROCESSING_TIMEOUT, 0.0001)
setup do
Setting.set('ticket_trigger_recursive', true)
end
@ -4683,4 +4688,6 @@ class TicketTriggerTest < ActiveSupport::TestCase
assert_match('Thanks for your inquiry (Online-apotheke. Günstigster Preis. Ohne Rezepte)!', article1.subject)
assert_equal(0, article1.attachments.count)
end
HtmlSanitizer.const_set(:PROCESSING_TIMEOUT, processing_timeout)
end