Skip to content

Changes for integration tests#8625

Open
davidblasby wants to merge 7 commits intogeonetwork:mainfrom
davidblasby:_elastic_disk
Open

Changes for integration tests#8625
davidblasby wants to merge 7 commits intogeonetwork:mainfrom
davidblasby:_elastic_disk

Conversation

@davidblasby
Copy link
Contributor

@davidblasby davidblasby commented Jan 28, 2025

This does the following:

  1. Set the integration test's elastic so it will NOT give low disk watermark error messages and refuse to start if your disk is >90% full.

    • for core/
    • for services/
  2. Set services so that it runs on a single JVM. This was because elastic is shared between all the different test cases - some tests were modifying the data at the same time (cf Formatter / Use portal filter #8263), causing inconsistencies as to the uuid of metadata record id=100.

  • this could cause some slow downs during the integration tests for services/. However, the slowdown was very small on my local computer. This is something to keep an eye on.
  1. One of the integration tests KeywordsApiTest#testImportOntologyToSkos uploaded a file - this would be written (by the ThesaurusManager) to the file system (WEB-INF). On the next run, the test would give an error saying the thesaurus already exisits
  • I've added some cleanup code to this test case.

This is problematic on development machines with low disk available (>90% full), and quite difficult to remedy.

I suspect that this hasn't been noticed because the build server;

  1. has enough disk space (<90% full)
  2. only runs the integration tests once (the added thesaurus isn't visible on the first run because WEB-INF is clean)
  3. Formatter / Use portal filter #8263 hasn't been merged yet.

Checklist

  • I have read the contribution guidelines
  • Pull request provided for main branch, backports managed with label
  • Good housekeeping of code, cleaning up comments, tests, and documentation
  • Clean commit history broken into understandable chucks, avoiding big commits with hundreds of files, cautious of reformatting and whitespace changes
  • Clean commit messages, longer verbose messages are encouraged
  • API Changes are identified in commit messages
  • Testing provided for features or enhancements using automatic tests
  • User documentation provided for new features or enhancements in manual
  • Build documentation provided for development instructions in README.md files
  • Library management using pom.xml dependency management. Update build documentation with intended library use and library tutorials or documentation

@CLAassistant
Copy link

CLAassistant commented Jan 28, 2025

CLA assistant check
All committers have signed the CLA.

@davidblasby
Copy link
Contributor Author

@davidblasby davidblasby changed the title elastic testing instance config - 'low disk watermark' Changes for integration tests Jan 30, 2025
@josegar74 josegar74 added this to the 4.4.7 milestone Feb 3, 2025
// the thesaurus already exists. This will clean up and there will not be a problem on the next run.
// This is typically only an issue if you are running the test locally - on the build server it gets a
// new, clean, filesystem so there isn't a problem.
var uploadedThesauras = geonetworkDataDirectory.resolveWebResource(
Copy link
Member

@josegar74 josegar74 Feb 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not use var as probably we have to backport this to 4.2.x, please change to use Path and add the import.

Copy link
Member

@josegar74 josegar74 Jul 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidblasby please check the previous comment to update the code, so the pull request can be merged, thanks.

@josegar74 josegar74 modified the milestones: 4.4.7, 4.4.8 Apr 10, 2025
@josegar74 josegar74 modified the milestones: 4.4.8, 4.4.9 May 28, 2025
@jahow jahow modified the milestones: 4.4.9, 4.4.10 Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants