Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Selenium test
ProcessesSelectingST
adds new test processes to the test database for testing the selection of processes over multiple pages. Unfortunately, the test environment of Kitodo.Production is currently set up in a very suboptimal way. The repository contains multiple test metadata folders and files with static process ids which are to be used in specific Selenium and integration tests, like for exampleKitodo/src/test/resources/metadata/2/meta.xml
At the same time, some tests - like
ProcessSelectingST
- add their own tests for local usage. Depending on the order in which the tests are executed then, these new test processes are sometimes assigned process ids by the database that interfere with those processes with static ids mentioned above. When a test cleans up its own (presumably) test ressources after execution, this can also lead to unintentionally removing wrong data and files required for other tests.Ideally, all data and files required for individually tests should be created/copied and cleaned up in the individual tests (as is done in
MetadataST
, for example), so that all tests always start with the same environment and can be executed independently in any order without interfering with each others resources. This means the repository should not contain any test resources in folders with specific IDs anymore.This PR changes the test
ProcessesSelectionST
so that it does not add new processes to the database but instead uses those that are already added. This should improve the chances for builds to succeed because fewer test execution orders will result in wrong test resource handling.There are many other tests with similar configuration issues, though, which will still lead to undeterministic build failures until fixed. These will probably be addressed during https://github.com/orgs/kitodo/projects/8.