HDDS-7566. Refactor TestRocksDBCheckpointDiffer tests.#8785
HDDS-7566. Refactor TestRocksDBCheckpointDiffer tests.#8785jojochuang merged 4 commits intoapache:masterfrom
Conversation
Moved CompactionDag specific tests from TestRocksDBCheckpointDiffer to a new TestCompactionDag class. This makes the tests more organized and easier to maintain. Change-Id: I748810c0260f7baa974a4f9f9d8f3007d70f3c10
|
@smengcl @sadanand48 @SaketaChalamchala this is a trivial refactor. |
|
Thanks for the patch @jojochuang . We can also move |
There was a problem hiding this comment.
Pull Request Overview
This PR refactors test organization by moving CompactionDag-specific tests from TestRocksDBCheckpointDiffer to a new dedicated TestCompactionDag class, improving test maintainability and organization.
- Removes CompactionDag-related test constants, helper methods, and test cases from TestRocksDBCheckpointDiffer
- Creates new TestCompactionDag class with moved CompactionDag-specific tests
- Updates test methods to use CompactionDag instance instead of RocksDBCheckpointDiffer
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| TestRocksDBCheckpointDiffer.java | Removes CompactionDag-specific test constants, helper methods, and test cases |
| TestCompactionDag.java | New test class containing all moved CompactionDag-specific tests and utilities |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| return dag; | ||
| } | ||
|
|
||
| dag = GraphBuilder.directed().build(); |
There was a problem hiding this comment.
Redundant variable assignment. The variable dag is already initialized on line 115 with the same value. Remove this duplicate assignment.
| dag = GraphBuilder.directed().build(); |
| } | ||
|
|
||
| /** | ||
| * Test cases for pruneBackwardDag. |
There was a problem hiding this comment.
The comment incorrectly describes test cases for pruneBackwardDag when this method provides test cases for pruneForwardDag. Update the comment to 'Test cases for pruneForwardDag.'
| * Test cases for pruneBackwardDag. | |
| * Test cases for pruneForwardDag. |
smengcl
left a comment
There was a problem hiding this comment.
Thanks @jojochuang . I don't have more to add except pls address @SaketaChalamchala 's comment above.
Change-Id: I052727052e74a50b62e6e7752809007b18cd1897
Change-Id: Iadae0b62697dd67316a0de8557c8ab1ce5fedb85
|
Merged with Saketa's suggestion. Thanks @smengcl @SaketaChalamchala |
What changes were proposed in this pull request?
HDDS-7566. Refactor TestRocksDBCheckpointDiffer tests.
Please describe your PR in detail:
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-7566
How was this patch tested?
mvn test -Dtest=TestCompactionDag,TestRocksDBCheckpointDiffer