Tests: Resolve flaky Automatix test #5866
Merged
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.
Since 7093082 (Improvements of automatix daemon : Closes #5616, #5617
(#5621), 2022-09-02), the
test_automatix
test fails infrequently. Theerror message provided suggests, that the
project
variable sometimesget converted to an integer:
The
project
variable used is initialized via the first 8 characters ofa random uuid4 string. This string contains hexadecimal values, which
can lead to a string with the 8 first characters being just integers.
The probability for that with
(10 / 16) ^ 8 = 2.33%
(if we asume auniform distribution) is fairly low, however, we run the tests quite
frequently. This thus is a vaiable candidate for the error.
The
filter_engine
used inlist_dids
is responsible for convertingthe string to an int. This is desired for now. Postgres is the only
engine which does not provide a functionality to compare a string and an
integer.
Using a string which does not automatically gets converted to an integer
solves the problem.