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

Fix process selection st #5765

Merged
merged 2 commits into from
Oct 6, 2023

Conversation

solth
Copy link
Member

@solth solth commented Sep 1, 2023

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 example Kitodo/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.

@solth solth added the bug label Sep 1, 2023
@solth solth merged commit e107408 into kitodo:master Oct 6, 2023
2 checks passed
@solth solth deleted the fix-process-selection-st branch October 6, 2023 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

2 participants