-
Notifications
You must be signed in to change notification settings - Fork 349
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
Add more tests to FDA check #7338
base: main
Are you sure you want to change the base?
Conversation
d9f663e
to
900262b
Compare
304bdb3
to
d8f82ad
Compare
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.
Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @MarkusPettersson98)
talpid-core/src/split_tunnel/macos/process.rs
line 616 at r1 (raw file):
#[tokio::test] async fn test_parse_logger_status_timeout() { let need_fda = parse_logger_status(
This test doesn't seem to test any time out now (since it immediately prints to stdout/stderr). It is identical to test_parse_logger_status_immediate_exit
.
Would something like make more sense?
let stdout = output("This will never be printed\n", Duration::MAX);
let stderr = output(
"ES_NEW_CLIENT_RESULT_ERR_NOT_PERMITTED\n",
EARLY_FAIL_TIMEOUT + Duration::from_secs(1),
);
Though I'm not sure if it's particularly valuable given that it's just a special case of test_parse_logger_status_hogged
. Removing it might be fine?
talpid-core/src/split_tunnel/macos/process.rs
line 657 at r1 (raw file):
EARLY_FAIL_TIMEOUT / 2, ); tokio::time::resume();
Are start
and resume
necessary here? I think it should just work if you only set the start_paused
attribute: #[tokio::test(start_paused = true)]
Add test for checking that the newly added timeout to the FDA check works 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.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @dlon)
talpid-core/src/split_tunnel/macos/process.rs
line 616 at r1 (raw file):
Previously, dlon (David Lönnhager) wrote…
This test doesn't seem to test any time out now (since it immediately prints to stdout/stderr). It is identical to
test_parse_logger_status_immediate_exit
.Would something like make more sense?
let stdout = output("This will never be printed\n", Duration::MAX); let stderr = output( "ES_NEW_CLIENT_RESULT_ERR_NOT_PERMITTED\n", EARLY_FAIL_TIMEOUT + Duration::from_secs(1), );
Though I'm not sure if it's particularly valuable given that it's just a special case of
test_parse_logger_status_hogged
. Removing it might be fine?
It is a special case of test_parse_logger_status_hogged
, so I think we can simply remove this one. Renaming it to test_parse_logger_status_timeout
though 😊
talpid-core/src/split_tunnel/macos/process.rs
line 657 at r1 (raw file):
Previously, dlon (David Lönnhager) wrote…
Are
start
andresume
necessary here? I think it should just work if you only set thestart_paused
attribute:#[tokio::test(start_paused = true)]
We can get rid of start
in favor of #[tokio::test(start_paused = true)]
, but resume
seems relevant to me because time should not be frozen during the subsequent call to parse_logger_status
. Maybe I understand the tokio::time
test utils wrong tho
d8f82ad
to
e3eee7b
Compare
This PR touches up the FDA check code just a little bit more to ensure that no obvious bugs are still present.
This change is