zebra/zebra-network
Janito Vaqueiro Ferreira Filho 1f756fcc81
Add `zebra_test::init_async` helper function (#3169)
* 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.
2021-12-09 00:18:17 +00:00
..
proptest-regressions Parse `MSG_WTX` inventory type (part of ZIP-239) (#2446) 2021-07-07 11:06:11 +10:00
src Add `zebra_test::init_async` helper function (#3169) 2021-12-09 00:18:17 +00:00
Cargo.toml Stop doing thousands of time checks each time we connect to a peer (#3106) 2021-12-03 15:09:43 -03:00