Skip to content

Delete duplicate tests from network-modification-server to only have them in lib#829

Open
basseche wants to merge 7 commits into
mainfrom
delete_duplicate_tests
Open

Delete duplicate tests from network-modification-server to only have them in lib#829
basseche wants to merge 7 commits into
mainfrom
delete_duplicate_tests

Conversation

@basseche

@basseche basseche commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

PR Summary

@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 49a4e8c8-289d-4a34-9095-cdcebb4abdea

📥 Commits

Reviewing files that changed from the base of the PR and between 4b8c6a9 and dd41a5e.

📒 Files selected for processing (2)
  • src/test/java/org/gridsuite/modification/server/modifications/ModificationReferenceTest.java
  • src/test/java/org/gridsuite/modification/server/modifications/ParameterizedNetworkModificationControllerTest.java
💤 Files with no reviewable changes (1)
  • src/test/java/org/gridsuite/modification/server/modifications/ModificationReferenceTest.java
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/test/java/org/gridsuite/modification/server/modifications/ParameterizedNetworkModificationControllerTest.java

📝 Walkthrough

Walkthrough

Refactors the test infrastructure by removing post-create/delete assertion hooks and message-validation helpers from AbstractNetworkModificationTest, deletes LineSplitWithNewVoltageLevelTest, removes matching overrides from CompositeModificationsTest and ModificationReferenceTest, and introduces ParameterizedNetworkModificationControllerTest as a new API-level test class that directly exercises network modification REST CRUD operations without relying on per-subclass assertion overrides.

Changes

Test infrastructure refactoring and API-level test consolidation

Layer / File(s) Summary
Refactor AbstractNetworkModificationTest to remove hook infrastructure
src/test/java/org/gridsuite/modification/server/modifications/AbstractNetworkModificationTest.java
Removed protected abstract methods assertAfterNetworkModificationCreation(), assertAfterNetworkModificationDeletion(), testCreationModificationMessage(), testUpdateModificationMessage(), and network accessors setNetwork(), getNetworkId(), getNetworkUuid(), getImpactedSubstationsIds(). Updated shared test flows (testCreate, testCreateDisabledModification, testUpdate, testDelete) to eliminate invocations of these hooks and "only metadata" message assertions.
Remove test classes and overrides
src/test/java/org/gridsuite/modification/server/modifications/LineSplitWithNewVoltageLevelTest.java, CompositeModificationsTest.java, ModificationReferenceTest.java
Deleted LineSplitWithNewVoltageLevelTest integration test class. Removed overridden assertAfterNetworkModificationCreation(), assertAfterNetworkModificationDeletion(), testCreationModificationMessage(), and testUpdateModificationMessage() methods from CompositeModificationsTest and ModificationReferenceTest, which are no longer invoked by the refactored base class.
Add ParameterizedNetworkModificationControllerTest for API coverage
src/test/java/org/gridsuite/modification/server/modifications/ParameterizedNetworkModificationControllerTest.java
New parameterized integration test class that exercises network modification REST API directly via MockMvc. Covers create-read-update-delete flows, disabled modifications, copy operations, and stash/unstash behaviors across four parameterized modification types (equipment attribute, generator, composite, tabular). Includes setup/teardown of in-memory test network and mocked service dependencies, plus DTO factory helpers for building test payloads.

Suggested reviewers

  • Meklo
  • SlimaneAmar
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The description field only contains a template header without substantive details about the changes, making it vague and uninformative. Provide a meaningful description explaining which tests are duplicated and why they're being removed.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: removing duplicate tests from network-modification-server to consolidate them in the library.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch delete_duplicate_tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@basseche basseche changed the title test WIP : test Jun 4, 2026
@basseche basseche changed the title WIP : test WIP : Delete duplicate tests from network-modification-server to only have them in lib Jun 4, 2026
@basseche basseche self-assigned this Jun 4, 2026
Signed-off-by: basseche <bassel.el-cheikh_externe@rte-france.com>
@basseche basseche force-pushed the delete_duplicate_tests branch from f65e92e to c66850d Compare June 10, 2026 14:53
@basseche basseche force-pushed the delete_duplicate_tests branch from 785e4dd to 10c533d Compare June 11, 2026 09:26
@basseche basseche changed the title WIP : Delete duplicate tests from network-modification-server to only have them in lib Delete duplicate tests from network-modification-server to only have them in lib Jun 11, 2026
@sonarqubecloud

Copy link
Copy Markdown

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