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

Updated by Go MAEDA 19 days ago Actions #1

  • Category set to Code cleanup/refactoring
  • Target version set to 6.1.7

Setting the target version to 6.1.7.

Updated by Go MAEDA 16 days ago Actions #2

  • Subject changed from Redmine::Configuration.with: Restore the settings if the block raises to Restore Redmine::Configuration.with settings when the block raises

Committed the patch in r25470. Thank you.

Updated by Go MAEDA 16 days ago Actions #3

  • Status changed from New to Resolved
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Updated by Go MAEDA 15 days ago Actions #4

  • Status changed from Resolved to Closed

Merged the fix into the stable branches in r25471 and r25472.

Actions

Also available in: PDF Atom