From 502e60b0514e435d1251c1390ec83ed878c0054b Mon Sep 17 00:00:00 2001 From: Martin Gruner Date: Fri, 11 Feb 2022 15:25:39 +0100 Subject: [PATCH] Maintenance: Stabilize Text Module test by disabling XSS processing timeout. --- spec/requests/text_module_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec/requests/text_module_spec.rb b/spec/requests/text_module_spec.rb index b2ff8c29a..de3241fd3 100644 --- a/spec/requests/text_module_spec.rb +++ b/spec/requests/text_module_spec.rb @@ -4,6 +4,11 @@ require 'rails_helper' RSpec.describe 'Text Module', type: :request do + before do + # XSS processing may run into a timeout on slow CI systems, so turn the timeout off for the test. + stub_const("#{HtmlSanitizer}::PROCESSING_TIMEOUT", nil) + end + let(:admin) do create(:admin) end