Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IMetadataRepository.removeReferences() #338

Merged

Conversation

HannesWell
Copy link
Member

@HannesWell HannesWell commented Sep 28, 2023

In order to allow removing references to other repositories from an IMetadataRepository, just like one can also remove IUs, this adds an IMetadataRepository.removeReferences(Collection) method and implements it in all classes that also implement IMetadataRepository.addReferences().

I have not yet added them, but a little test-case, at least for the most imporant implementation LocalMetadataRepository would probably be good.

@github-actions
Copy link

github-actions bot commented Sep 28, 2023

Test Results

       9 files  +       9         9 suites  +9   38m 27s ⏱️ + 38m 27s
2 177 tests +2 177  2 173 ✔️ +2 173    4 💤 +  4  0 ±0 
6 621 runs  +6 621  6 610 ✔️ +6 610  11 💤 +11  0 ±0 

Results for commit c28c0a0. ± Comparison against base commit 3bac97b.

♻️ This comment has been updated with latest results.

@HannesWell HannesWell force-pushed the metadataRemoveReference branch from dd1e28a to 87e40da Compare October 4, 2023 07:29
@HannesWell
Copy link
Member Author

I have not yet added them, but a little test-case, at least for the most imporant implementation LocalMetadataRepository would probably be good.

After thinking about that again, a test case would be quite trivial and just test that a collection would not contain elements anymore after they have been removed. Such trivial tests are usually not necessary.

Therefore I consider this ready. Any other opinions?

@merks
Copy link
Contributor

merks commented Oct 4, 2023

I personally don't think trivial test cases are needed.

@laeubi
Copy link
Member

laeubi commented Oct 4, 2023

a test case would be quite trivial

If its trivial it should be trivial to add it, no? :-D

@HannesWell HannesWell force-pushed the metadataRemoveReference branch 2 times, most recently from 8254bcd to 16af1ed Compare October 8, 2023 10:25
+ Clean-up the affected classes at a few occasions
+ Make LocalMetadataRepository.repositories a LinkedHashSet to ensure a
stable order of repository references, which simplifies manual
inspection of created content.xml files.
@HannesWell HannesWell force-pushed the metadataRemoveReference branch from 16af1ed to c28c0a0 Compare October 8, 2023 10:25
@HannesWell
Copy link
Member Author

a test case would be quite trivial

If its trivial it should be trivial to add it, no? :-D

It is. :) But testing trivial things just to increase the test-coverage also does not bring much value.
Anyway I now added tests for addReferences() and removeReferences() of LocalMetadataRepository.

Furthermore I made the LocalMetadataRepository.repositories a LinkedHashSet to ensure a stable order of repository references, which simplifies manual inspection of the generated content.xml files (technically there is no benefit).

@HannesWell HannesWell merged commit ff24c14 into eclipse-equinox:master Oct 8, 2023
7 checks passed
@HannesWell HannesWell deleted the metadataRemoveReference branch October 8, 2023 11:14
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.

3 participants