Zebra/zebrad/src
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
..
async_ext Fix synchronization delay issue (#2921) 2021-10-21 10:34:12 +10:00
bin/zebrad Standardise clippy lints and require docs (#2238) 2021-06-04 08:48:40 +10:00
commands Fix slow Zebra startup times, to reduce CI failures (#3104) 2021-11-30 21:04:32 +00:00
components Add `zebra_test::init_async` helper function (#3169) 2021-12-09 00:18:17 +00:00
application.rs Stop asking users to report peer errors, fix a common peer error (#3054) 2021-11-15 11:32:18 -03:00
async_ext.rs Fix synchronization delay issue (#2921) 2021-10-21 10:34:12 +10:00
commands.rs Download Zcash Sapling parameters and load them from cached files (#3057) 2021-11-19 23:02:56 +00:00
components.rs Re-order Zebra startup, so slow services are launched last (#3091) 2021-11-23 17:42:44 +00:00
config.rs Stop downloading unnecessary blocks in Zebra acceptance tests (#3072) 2021-11-19 01:55:38 +00:00
lib.rs Stop downloading unnecessary blocks in Zebra acceptance tests (#3072) 2021-11-19 01:55:38 +00:00
prelude.rs Fix a deadlock in TokioComponent. 2020-01-15 12:06:31 -08:00
sentry.rs Standardise clippy lints and require docs (#2238) 2021-06-04 08:48:40 +10:00