From e6aec87df1c157c21f0993836e3cc37375fbb75e Mon Sep 17 00:00:00 2001 From: Martin Gruner Date: Fri, 11 Feb 2022 08:19:43 +0100 Subject: [PATCH] Maintenance: Fixed timeout issue in ticket_trigger_test.rb. --- test/unit/ticket_trigger_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/unit/ticket_trigger_test.rb b/test/unit/ticket_trigger_test.rb index 2a22d501d..92086a41a 100644 --- a/test/unit/ticket_trigger_test.rb +++ b/test/unit/ticket_trigger_test.rb @@ -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