Project

General

Profile

Actions

Defect #44751

closed

Restore Redmine::Configuration.with settings when the block raises

Defect #44751: Restore Redmine::Configuration.with settings when the block raises

Added by Nishida Yuya 22 days ago. Updated 15 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Code cleanup/refactoring
Target version:
Resolution:
Fixed
Affected version:

Description

Redmine::Configuration.with temporarily overrides configuration settings while the block is executed. Currently it is mainly used in tests. However, if the block raises an exception, the overridden settings are not restored.

When an assertion fails in the block, the overridden settings remain for the subsequent tests, and unrelated tests may also fail. This patch fixes it.

CI results: Tests, Lint


Files

Actions

Also available in: PDF Atom