Skip to content

fix(tests): Fix test case for Prometheus metrics

Mario Oenning requested to merge moson/aurweb:fix-metrics-test into master

Disable prometheus multiprocess mode in tests to avoid global state:
Depending on the workers which are processing a testfile, we might run into race issues where tests might influence each other.
We also need to make sure to clear any previously collected values in case the same worker/process is executing different tests which evaluate prometheus values.
(https://github.com/prometheus/client_python/issues/916)

Example of a failing test run: https://gitlab.archlinux.org/archlinux/aurweb/-/jobs/193559

Merge request reports

Loading