Skip to content

Restore original settings on exception#141

Merged
3dgiordano merged 1 commit into
developmentfrom
FEATURE-CACHE-TEST-ISOLATION-FIX
Jul 18, 2026
Merged

Restore original settings on exception#141
3dgiordano merged 1 commit into
developmentfrom
FEATURE-CACHE-TEST-ISOLATION-FIX

Conversation

@3dgiordano

Copy link
Copy Markdown
Collaborator

This pull request improves the reliability of tests in HTTP2JettyClientTest.java by ensuring that changes to the cache_manager.cached_resource_mode property are properly restored after each test. This prevents side effects between tests that could lead to inconsistent results.

Test isolation improvements:

  • Wrapped the modification of the cache_manager.cached_resource_mode property in shouldNotGetSubResultWhenResourceIsCachedWithCode() and shouldNotGetSubResultWhenResourceIsCachedWithoutCode() in a try/finally block, saving and restoring the previous value to avoid side effects between tests. [1] [2] [3] [4]
  • Added a new helper method restoreCacheResourceMode to encapsulate the logic for restoring or removing the property as appropriate.

@3dgiordano
3dgiordano merged commit 51c99d1 into development Jul 18, 2026
2 checks passed
@3dgiordano
3dgiordano deleted the FEATURE-CACHE-TEST-ISOLATION-FIX branch July 18, 2026 15:41
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.

1 participant