* Use a single-thread shared Tokio runtime This allows it to pause the time and more closely resembles the environment that's set by default for asynchronous tests. * Add a `zebra_test::init_async` helper function Calls `zebra_test::init` but also constructs a single-thread Tokio runtime and returns it. This makes it simpler to initialize asynchronous tests that can't use the `#[tokio::test]` attribute. * Replace usages of `Runtime::new` in tests Use the new `zebra_test::init_async()` helper function instead. * Replace `runtime::Builder::new_current_thread()` Use the new `zebra_test::init_async()` helper function instead. * Replace `runtime::Builder::new_multi_thread()` Use the new `zebra_test::init_async()` helper function instead. The test with the change doesn't necessarily have to use a multi-thread runtime. |
||
|---|---|---|
| .. | ||
| async_ext | ||
| bin/zebrad | ||
| commands | ||
| components | ||
| application.rs | ||
| async_ext.rs | ||
| commands.rs | ||
| components.rs | ||
| config.rs | ||
| lib.rs | ||
| prelude.rs | ||
| sentry.rs | ||