[WIP] Sort the tests to have reproducible test runs? #50
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 very same package (same SHA sum!) builds in the IBS (example log), but fails in OBS in the tests (example log).
It turned out that the difference is the order of the testing files passed to rspec. Because the order is unspecified the tests are loaded in the order in which they are stored on the disk. Which means it is basically random.
This is very tricky to debug, even in the very same enviroment but with a different filesystem the result might be completely different.
Ideally the tests should be idempotent and it should not depend on the order. But this is difficult to achieve, esp. when there are hundreds of tests. And we cannot test every possible test permutations.
So the question is: Do we prefer more reliable reproducible runs or is it better to have more or less random order which might randomly break but helps to reveal possible issues in the tests?