Details
-
Task
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
Code Clarity
-
Normal
-
All
-
None
-
Description
The WithProperties is used to handle system properties to set and reset values during the test run, instead of try-catch it uses the try-with-resource approach which facilitates test development.
We need to replace all the try-catch clauses that work with system properties with WithProperties and try-with-resource for all the similar cases and where it is technically possible.
Example:
try { COMMITLOG_IGNORE_REPLAY_ERRORS.setBoolean(true); testRecoveryWithGarbageLog(); } finally { COMMITLOG_IGNORE_REPLAY_ERRORS.clearValue(); }
Can be replaced with:
try (WithProperties = new WithProperties().with(COMMITLOG_IGNORE_REPLAY_ERRORS, "true")) { testRecoveryWithGarbageLog(); }
Attachments
Issue Links
- links to