Issue 6753 - Removing ticket49412_test and porting to DSLdapObject#7428
Issue 6753 - Removing ticket49412_test and porting to DSLdapObject#7428aadhikar wants to merge 1 commit into389ds:mainfrom
Conversation
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The test mutates the changelog maxage and triminterval but never restores the original values; consider capturing the initial values and using a try/finally (or fixture) to reset the configuration to avoid cross-test side effects.
- The test name and docstring suggest validating types/values, but only the happy-path of valid string values is exercised; either extend the test to cover invalid values and expected failures or rename it to reflect that it only verifies valid value handling.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The test mutates the changelog maxage and triminterval but never restores the original values; consider capturing the initial values and using a try/finally (or fixture) to reset the configuration to avoid cross-test side effects.
- The test name and docstring suggest validating types/values, but only the happy-path of valid string values is exercised; either extend the test to cover invalid values and expected failures or rename it to reflect that it only verifies valid value handling.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
Congratulations! One of the builds has completed. 🍾 You can install the built RPMs by following these steps:
Please note that the RPMs should be used only in a testing environment. |
Description: Port test to changelog_test.py using Changelog/Changelog5 classes, supporting both legacy and new changelog. Replace wildcard imports. Relates: 389ds#6753 Reviewed by: @bsimonova (Thanks!) Assisted by: Claude
ad9f7de to
5cfe891
Compare
|
Note: changelog_test.py is not part of the CI test matrix. test_changelog_type_validation was verified locally and passes on both LMDB and BDB backends. |
| cl.replace(MAXAGE, '60s') | ||
|
|
||
| log.info('Setting changelog trim interval to 10s') | ||
| cl.replace(TRIMINTERVAL, '10s') |
There was a problem hiding this comment.
I don't think the time unit "s" is supported. The trim interval is always in seconds. So just "10" is sufficient.
There was a problem hiding this comment.
@mreynolds389
I believe 's' is supported, see is_valid_duration_unit(): https://github.com/389ds/389-ds-base/blob/main/ldap/servers/slapd/time.c#L716-L734
But happy to change it to just '10' if you would prefer keeping it without the unit.
There was a problem hiding this comment.
Indeed it's allowed, ok leave it as it.
Description:
The old ticket49412_test.py had compatibility issues.
This ports the functionality to changelog_test.py
using modern Changelog5 class from lib389.
Relates: #6753
Reviewed by: ???
Assisted by: Claude
Summary by Sourcery
Migrate legacy changelog type validation coverage into the replication changelog test suite and remove the obsolete ticket-specific test file.
Tests: