-
-
Notifications
You must be signed in to change notification settings - Fork 97
feat: migrate from async-std to tokio #3449
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
Conversation
Remove "teset" (sqlite file) |
@@ -250,6 +250,17 @@ impl TestContext { | |||
Self::builder().configure_fiona().build().await | |||
} | |||
|
|||
/// Print current chat state. | |||
pub async fn print_chats(&self) { |
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.
Is this ever called? Previously it was in the Drop
implementation for TestContext
.
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.
The nested block_on calls are not possible in tokio anymore (it has a check to avoid them and panics). As this seems to be for debugging, I figured I add this method here, and allow devs to manually add it if they want this information when debugging.
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.
async-channel = "1.6.1" | ||
futures-lite = "1.12.0" | ||
tokio-stream = { version = "0.1.9", features = ["fs"] } | ||
reqwest = { version = "0.11.11", features = ["json"] } |
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.
Just a note: reqwest
supports SOCKS5 so we can have SOCKS5 support for HTTPS requests now. cc @Jikstra
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.
Haven't tested, only looked through the changes
|
yes been debugging it for a while, stack usage is just high, if I increase the stack size to 2.5Mib (instead of the default 2Mib) the test passes -.- |
This only happens in one test, maybe refactor it instead? Otherwise |
Also |
One of the issues about high tokio stack usage in debug builds: tokio-rs/tokio#2055 Maybe instead of increasing stack size we tune our debug build to be more like release? |
did this, this fixes it more reasonable, haven't found a good way to refactor the test to fix the issue |
E.g. ``` ========== Chats of bob: ========== Single#Chat#10: [email protected] [[email protected]] -------------------------------------------------------------------------------- Msg#10: (Contact#Contact#10): hellooo [FRESH] Msg#11: (Contact#Contact#10): hellooo without mailing list [FRESH] -------------------------------------------------------------------------------- ========== Chats of alice: ========== Single#Chat#10: [email protected] [[email protected]] -------------------------------------------------------------------------------- Msg#10: Me (Contact#Contact#Self): hellooo √ Msg#11: Me (Contact#Contact#Self): hellooo without mailing list √ -------------------------------------------------------------------------------- ``` I found this very useful sometimes, so, let's try to re-introduce it (it was removed in #3449)
* Print chats after a test failed again E.g. ``` ========== Chats of bob: ========== Single#Chat#10: [email protected] [[email protected]] -------------------------------------------------------------------------------- Msg#10: (Contact#Contact#10): hellooo [FRESH] Msg#11: (Contact#Contact#10): hellooo without mailing list [FRESH] -------------------------------------------------------------------------------- ========== Chats of alice: ========== Single#Chat#10: [email protected] [[email protected]] -------------------------------------------------------------------------------- Msg#10: Me (Contact#Contact#Self): hellooo √ Msg#11: Me (Contact#Contact#Self): hellooo without mailing list √ -------------------------------------------------------------------------------- ``` I found this very useful sometimes, so, let's try to re-introduce it (it was removed in #3449) * Add failing test for TestContext::drop() * Do not panic in TestContext::drop() if runtime is dropped Co-authored-by: link2xt <[email protected]>
Working on this, to see impact and stability, as well as make it easier to integrate certain other pieces down the line
depends on