Project

General

Profile

Patch #44116 » 0003-Fix-flaky-tests-caused-by-locale-leakage.patch

Katsuya HIDAKA, 2026-05-23 04:39

View differences:

test/test_helper.rb
self.use_transactional_tests = true
self.use_instantiated_fixtures = false
setup do
# Tests mutate the process-global locale; reset it so test order does not
# affect translated assertions in later tests run by the same worker.
::I18n.locale = ::I18n.default_locale
end
parallelize_setup do |worker|
# Use a separate attachment directory for each worker.
$redmine_tmp_attachments_directory =
test/unit/lib/redmine/i18n_test.rb
User.current = nil
end
def teardown
set_language_if_valid 'en'
end
def test_date_format_default
set_language_if_valid 'en'
today = Date.today
test/unit/lib/redmine/wiki_formatting/common_mark/alerts_icons_scrubber_test.rb
@options = { }
end
def teardown
set_language_if_valid 'en'
end
def test_should_render_alert_blocks_with_localized_labels
set_language_if_valid 'de'
text = <<~MD
(3-3/4)