-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Fix test_logging_to_driver and test_not_logging_to_driver #5462
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2649,8 +2649,11 @@ def f(): | |
output_lines = captured["out"] | ||
for i in range(200): | ||
assert str(i) in output_lines | ||
error_lines = captured["err"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we remove this check, then we should include a comment that explains what goes wrong if we do check it. Since people (myself included) will be very tempted to bring back this check. |
||
assert len(error_lines) == 0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This makes me realize that this line should have been assert len(error_lines) == 0, error_lines so that we can what the stderr was in the case of error |
||
|
||
# TODO(rkn): Check that no additional logs appear beyond what we expect | ||
# and that there are no duplicate logs. Once we address the issue | ||
# described in https://github.com/ray-project/ray/pull/5462, we should | ||
# also check that nothing is logged to stderr. | ||
|
||
|
||
def test_not_logging_to_driver(shutdown_only): | ||
|
@@ -2671,8 +2674,11 @@ def f(): | |
|
||
output_lines = captured["out"] | ||
assert len(output_lines) == 0 | ||
error_lines = captured["err"] | ||
assert len(error_lines) == 0 | ||
|
||
# TODO(rkn): Check that no additional logs appear beyond what we expect | ||
# and that there are no duplicate logs. Once we address the issue | ||
# described in https://github.com/ray-project/ray/pull/5462, we should | ||
# also check that nothing is logged to stderr. | ||
|
||
|
||
@pytest.mark.skipif( | ||
|
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.
Unrelated to the test failure, but in this test we should really be checking that we don't get any unintended log messages (or duplicates). Especially since @stephanie-wang saw some duplicates recently.