mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 13:27:57 +00:00
Upgrade tokio to 1.22.0 and replace async-std with tokio (#12646)
* Replace deprecated libp2p feature specs with correct ones * Bump tokio to 1.21.2 * Replace async-std libp2p primitives with tokio ones * minor: rustfmt * Fix TestNet to run initialization in the tokio context * Convert telemetry test from async-std to tokio * Convert notifications tests from async-std to tokio * Convert chain sync tests from async-std to tokio * Ditch async-std completely * Make executor mandatory * Bump tokio to 1.22.0 * minor: rustfmt * Explicitly use tokio runtime in tests * Move more tests to explicit tokio runtime * Explicitly set multithreaded runtime in tokio test * minor: rustfmt * minor: fix comment * Replace async-std with tokio in MMR tests
This commit is contained in:
@@ -126,7 +126,7 @@ mod tests {
|
||||
|
||||
// typical pattern in `Protocol` code where peer is disconnected
|
||||
// and then reported
|
||||
#[async_std::test]
|
||||
#[tokio::test]
|
||||
async fn disconnect_and_report_peer() {
|
||||
let (provider, handle) = NetworkServiceProvider::new();
|
||||
|
||||
@@ -147,7 +147,7 @@ mod tests {
|
||||
.once()
|
||||
.returning(|_, _| ());
|
||||
|
||||
async_std::task::spawn(async move {
|
||||
tokio::spawn(async move {
|
||||
provider.run(Arc::new(mock_network)).await;
|
||||
});
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ use substrate_test_runtime_client::{TestClientBuilder, TestClientBuilderExt as _
|
||||
|
||||
// verify that the fork target map is empty, then submit a new sync fork request,
|
||||
// poll `ChainSync` and verify that a new sync fork request has been registered
|
||||
#[async_std::test]
|
||||
#[tokio::test]
|
||||
async fn delegate_to_chainsync() {
|
||||
let (_chain_sync_network_provider, chain_sync_network_handle) = NetworkServiceProvider::new();
|
||||
let (mut chain_sync, chain_sync_service, _) = ChainSync::new(
|
||||
|
||||
Reference in New Issue
Block a user