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
Use xfail
consistently for known failing tests
#867
Conversation
Codecov Report
@@ Coverage Diff @@
## main #867 +/- ##
==========================================
+ Coverage 77.69% 80.63% +2.93%
==========================================
Files 75 75
Lines 4218 4218
Branches 766 766
==========================================
+ Hits 3277 3401 +124
+ Misses 775 651 -124
Partials 166 166
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
# FIXME: handling is needed for httpx-based fastapi>=0.87.0 | ||
- fastapi>=0.69.0,<0.87.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fastapi>=0.87.0
pulls in starlette>=0.21.0
, which switched to using httpx
instead of requests
for its TestClient
API (encode/starlette#1376); it's not immediately obvious to me how to support both versions of the API, so this pins us to the older starlette
packages for now.
@@ -332,15 +332,15 @@ def gpu_client(gpu_cluster): | |||
# client for all computations. otherwise, only connect to a client | |||
# when specified. | |||
@pytest.fixture( | |||
scope="function" if SCHEDULER_ADDR is None else "session", | |||
scope="function", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we use a session-wide client for external cluster testing, it ends up getting blown away with dask.config.refresh()
while running test_config.py
. Since there wasn't any immediate way to avoid this, I made this change so that we reconnect to the external cluster on each test, so that tests run after test_config.py
are still able to use the external cluster as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also wonder if test_config
can be improved somehow to save the state of configs before the tests start and restore that state at the end of the test.
Either way I didn't see a noticeable change in overall test runtimes with this change so it might be okay to improve later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this overhaul of the pytests and moving over to marking everything as xfail and removing commented subparts of tests into their own xfailing test. This will help us catch bugs and issues much quicker.
The intent of this PR is to make the way we indicate failing tests more consistent, by:
Closes #899