Skip to content
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

chore(tests): don't use .wait() and use block_on instead #2220

Merged
merged 4 commits into from
Sep 24, 2024

Commits on Sep 16, 2024

  1. tests: change wait usages to block_on (but for futures01)

    this makes sure we run these waited futures on the same runtime.
    
    this fixes the problem with tokio tcp stream breaking when it's
    instantiated from within the .wait() method and not from the tokio
    runtime
    mariocynicys committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    a58dbf7 View commit details
    Browse the repository at this point in the history
  2. don't use block_on on mocked methods

    because we now use tokio's block_on to wait for this method and not futures' wait. this means we will block_on the same runtime recurrsively and panic. So instead of block_on in mock methods, fut.boxed() like the original methods.
    
    the difference between the two impls of the mock is that
    the first one ran synchronously and returned an immediately ready future,
    the second one creates an non-ready future to be ran asynchronously by the caller.
    mariocynicys committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    6d7e8eb View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2024

  1. suggestions by onur 1

    doc comments & magic clippy rule :O
    mariocynicys committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    1ebc318 View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2024

  1. merge with origin/dev

    mariocynicys committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    7bbe8b4 View commit details
    Browse the repository at this point in the history