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.
test_commands.py
is a smoke test that runs almost every command to make sure no exceptions are thrown. This test was skipped because it was slow and flaky. These PR makes a few changes to this:First, instead of running every command in a loop, we run each command in its own test. This helps because the tests can then be parallelized, and if a test fails you only see that commands output and not every commands output.
Then, instead of skipping the test unconditionally, we only skip it if we detect we're not running on CI and if the
RUN_FLAKY
environment variable is not set. This means it won't slow down your test workflow unless you really want to run it withRUN_FLAKY=1 ./tests.sh
.Finally, the test is marked as
xfail
. If any of the parameterized tests fail, their result will be XFAIL instead of FAILED. If any of those tests pass, they'll be listed as XPASS instead of PASSED. None of these results will affect the results of the CI. The reason this is done is so we can still use the test locally and on CI without this flaky test making us think we have real errors. As we improve this test in the future, we can remove this and require the CI pass this test as well.