Skip to content

Share external DTD dictionary retry loader across DataDictionaryTest and MessageTest#1244

Merged
chrjohn merged 1 commit into
masterfrom
copilot/fix-datadictionary-test-timeout
May 31, 2026
Merged

Share external DTD dictionary retry loader across DataDictionaryTest and MessageTest#1244
chrjohn merged 1 commit into
masterfrom
copilot/fix-datadictionary-test-timeout

Conversation

Copilot AI commented May 29, 2026

Copy link
Copy Markdown
Contributor

DataDictionaryTest.shouldLoadDictionaryWhenExternalDTDisEnabled could fail on external DTD fetch timeouts, while MessageTest already had a retry-based mitigation for the same failure mode. This change applies the same timeout/retry behavior to DataDictionaryTest and centralizes the logic so both tests use one implementation.

  • Shared external DTD loader

    • Added ExternalDtdDataDictionaryLoader in quickfixj-base to encapsulate:
      • temporary connect/read timeout overrides
      • bounded retries with backoff
      • property restoration on exit
  • DataDictionaryTest

    • Replaced the direct DataDictionary("FIX_External_DTD.xml", ...) construction with the shared loader so the test tolerates transient network timeouts when resolving the external DTD.
  • MessageTest

    • Removed the test-local retry implementation and switched to the shared loader, keeping behavior aligned with DataDictionaryTest and avoiding duplicate logic.
DataDictionary dataDictionary =
        ExternalDtdDataDictionaryLoader.load("FIX_External_DTD.xml");

@chrjohn chrjohn changed the title Share external DTD dictionary retry loader across DataDictionaryTest and MessageTest Share external DTD dictionary retry loader across DataDictionaryTest and MessageTest May 31, 2026
@chrjohn chrjohn marked this pull request as ready for review May 31, 2026 15:26
@chrjohn chrjohn merged commit ac26cc9 into master May 31, 2026
21 checks passed
@chrjohn chrjohn deleted the copilot/fix-datadictionary-test-timeout branch May 31, 2026 15:26
@chrjohn chrjohn added this to the QFJ 3.0.2 milestone May 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants