matrix-sdk: Bump our tokio and reqwest versions.

master
Damir Jelić 2021-01-05 21:39:52 +01:00
parent 4f2cad8f62
commit b311a31c9e
7 changed files with 28 additions and 28 deletions

View File

@ -45,7 +45,7 @@ path = "../matrix_sdk_base"
default_features = false default_features = false
[dependencies.reqwest] [dependencies.reqwest]
version = "0.10.10" version = "0.11.0"
default_features = false default_features = false
[dependencies.tracing-futures] [dependencies.tracing-futures]
@ -57,9 +57,9 @@ features = ["std", "std-future"]
futures-timer = "3.0.2" futures-timer = "3.0.2"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio] [target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio]
version = "0.2.24" version = "1.0.1"
default-features = false default-features = false
features = ["fs", "blocking"] features = ["fs", "rt"]
[target.'cfg(target_arch = "wasm32")'.dependencies.futures-timer] [target.'cfg(target_arch = "wasm32")'.dependencies.futures-timer]
version = "3.0.2" version = "3.0.2"
@ -69,7 +69,7 @@ features = ["wasm-bindgen"]
async-std = { version = "1.8.0", features = ["unstable"] } async-std = { version = "1.8.0", features = ["unstable"] }
dirs = "3.0.1" dirs = "3.0.1"
matrix-sdk-test = { version = "0.2.0", path = "../matrix_sdk_test" } matrix-sdk-test = { version = "0.2.0", path = "../matrix_sdk_test" }
tokio = { version = "0.2.24", default-features = false, features = ["rt-threaded", "macros"] } tokio = { version = "1.0.1", default-features = false, features = ["rt-multi-thread", "macros"] }
serde_json = "1.0.61" serde_json = "1.0.61"
tracing-subscriber = "0.2.15" tracing-subscriber = "0.2.15"
tempfile = "3.1.0" tempfile = "3.1.0"

View File

@ -1,5 +1,5 @@
use std::{env, process::exit}; use std::{env, process::exit};
use tokio::time::{delay_for, Duration}; use tokio::time::{sleep, Duration};
use matrix_sdk::{ use matrix_sdk::{
self, async_trait, self, async_trait,
@ -44,7 +44,7 @@ impl EventEmitter for AutoJoinBot {
room.room_id, err, delay room.room_id, err, delay
); );
delay_for(Duration::from_secs(delay)).await; sleep(Duration::from_secs(delay)).await;
delay *= 2; delay *= 2;
if delay > 3600 { if delay > 3600 {

View File

@ -36,7 +36,7 @@ matrix-sdk-crypto = { version = "0.2.0", path = "../matrix_sdk_crypto", optional
thiserror = "1.0.23" thiserror = "1.0.23"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio] [target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio]
version = "0.2.24" version = "1.0.1"
default-features = false default-features = false
features = ["sync", "fs"] features = ["sync", "fs"]
@ -49,7 +49,7 @@ tempfile = "3.1.0"
mockito = "0.28.0" mockito = "0.28.0"
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
tokio = { version = "0.2.24", default-features = false, features = ["rt-threaded", "macros"] } tokio = { version = "1.0.1", default-features = false, features = ["rt-multi-thread", "macros"] }
[target.'cfg(target_arch = "wasm32")'.dev-dependencies] [target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen-test = "0.3.19" wasm-bindgen-test = "0.3.19"

View File

@ -25,7 +25,7 @@ features = ["client-api", "unstable-pre-spec"]
uuid = { version = "0.8.1", default-features = false, features = ["v4", "serde"] } uuid = { version = "0.8.1", default-features = false, features = ["v4", "serde"] }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio] [target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio]
version = "0.2.24" version = "1.0.1"
default-features = false default-features = false
features = ["sync"] features = ["sync"]

View File

@ -49,7 +49,7 @@ default-features = false
features = ["runtime-tokio-native-tls", "sqlite", "macros"] features = ["runtime-tokio-native-tls", "sqlite", "macros"]
[dev-dependencies] [dev-dependencies]
tokio = { version = "0.2.24", default-features = false, features = ["rt-threaded", "macros"] } tokio = { version = "1.0.1", default-features = false, features = ["rt-multi-thread", "macros"] }
futures = "0.3.8" futures = "0.3.8"
proptest = "0.10.1" proptest = "0.10.1"
serde_json = "1.0.61" serde_json = "1.0.61"

View File

@ -1756,7 +1756,7 @@ pub(crate) mod test {
} }
} }
#[tokio::test(threaded_scheduler)] #[tokio::test(flavor = "multi_thread")]
#[cfg(feature = "sqlite_cryptostore")] #[cfg(feature = "sqlite_cryptostore")]
async fn test_machine_with_default_store() { async fn test_machine_with_default_store() {
let tmpdir = tempdir().unwrap(); let tmpdir = tempdir().unwrap();

View File

@ -1985,7 +1985,7 @@ mod test {
(alice, session) (alice, session)
} }
#[tokio::test(threaded_scheduler)] #[tokio::test(flavor = "multi_thread")]
async fn create_store() { async fn create_store() {
let tmpdir = tempdir().unwrap(); let tmpdir = tempdir().unwrap();
let tmpdir_path = tmpdir.path().to_str().unwrap(); let tmpdir_path = tmpdir.path().to_str().unwrap();
@ -1994,7 +1994,7 @@ mod test {
.expect("Can't create store"); .expect("Can't create store");
} }
#[tokio::test(threaded_scheduler)] #[tokio::test(flavor = "multi_thread")]
async fn save_account() { async fn save_account() {
let (store, _dir) = get_store(None).await; let (store, _dir) = get_store(None).await;
assert!(store.load_account().await.unwrap().is_none()); assert!(store.load_account().await.unwrap().is_none());
@ -2006,7 +2006,7 @@ mod test {
.expect("Can't save account"); .expect("Can't save account");
} }
#[tokio::test(threaded_scheduler)] #[tokio::test(flavor = "multi_thread")]
async fn load_account() { async fn load_account() {
let (store, _dir) = get_store(None).await; let (store, _dir) = get_store(None).await;
let account = get_account(); let account = get_account();
@ -2022,7 +2022,7 @@ mod test {
assert_eq!(account, loaded_account); assert_eq!(account, loaded_account);
} }
#[tokio::test(threaded_scheduler)] #[tokio::test(flavor = "multi_thread")]
async fn load_account_with_passphrase() { async fn load_account_with_passphrase() {
let (store, _dir) = get_store(Some("secret_passphrase")).await; let (store, _dir) = get_store(Some("secret_passphrase")).await;
let account = get_account(); let account = get_account();
@ -2038,7 +2038,7 @@ mod test {
assert_eq!(account, loaded_account); assert_eq!(account, loaded_account);
} }
#[tokio::test(threaded_scheduler)] #[tokio::test(flavor = "multi_thread")]
async fn save_and_share_account() { async fn save_and_share_account() {
let (store, _dir) = get_store(None).await; let (store, _dir) = get_store(None).await;
let account = get_account(); let account = get_account();
@ -2066,7 +2066,7 @@ mod test {
); );
} }
#[tokio::test(threaded_scheduler)] #[tokio::test(flavor = "multi_thread")]
async fn save_session() { async fn save_session() {
let (store, _dir) = get_store(None).await; let (store, _dir) = get_store(None).await;
let (account, session) = get_account_and_session().await; let (account, session) = get_account_and_session().await;
@ -2081,7 +2081,7 @@ mod test {
store.save_sessions(&[session]).await.unwrap(); store.save_sessions(&[session]).await.unwrap();
} }
#[tokio::test(threaded_scheduler)] #[tokio::test(flavor = "multi_thread")]
async fn load_sessions() { async fn load_sessions() {
let (store, _dir) = get_store(None).await; let (store, _dir) = get_store(None).await;
let (account, session) = get_account_and_session().await; let (account, session) = get_account_and_session().await;
@ -2100,7 +2100,7 @@ mod test {
assert_eq!(&session, loaded_session); assert_eq!(&session, loaded_session);
} }
#[tokio::test(threaded_scheduler)] #[tokio::test(flavor = "multi_thread")]
async fn add_and_save_session() { async fn add_and_save_session() {
let (store, dir) = get_store(None).await; let (store, dir) = get_store(None).await;
let (account, session) = get_account_and_session().await; let (account, session) = get_account_and_session().await;
@ -2135,7 +2135,7 @@ mod test {
assert_eq!(session_id, session.session_id()); assert_eq!(session_id, session.session_id());
} }
#[tokio::test(threaded_scheduler)] #[tokio::test(flavor = "multi_thread")]
async fn save_inbound_group_session() { async fn save_inbound_group_session() {
let (account, store, _dir) = get_loaded_store().await; let (account, store, _dir) = get_loaded_store().await;
@ -2155,7 +2155,7 @@ mod test {
.expect("Can't save group session"); .expect("Can't save group session");
} }
#[tokio::test(threaded_scheduler)] #[tokio::test(flavor = "multi_thread")]
async fn load_inbound_group_session() { async fn load_inbound_group_session() {
let (account, store, dir) = get_loaded_store().await; let (account, store, dir) = get_loaded_store().await;
@ -2196,7 +2196,7 @@ mod test {
assert!(!export.forwarding_curve25519_key_chain.is_empty()) assert!(!export.forwarding_curve25519_key_chain.is_empty())
} }
#[tokio::test(threaded_scheduler)] #[tokio::test(flavor = "multi_thread")]
async fn test_tracked_users() { async fn test_tracked_users() {
let (_account, store, dir) = get_loaded_store().await; let (_account, store, dir) = get_loaded_store().await;
let device = get_device(); let device = get_device();
@ -2243,7 +2243,7 @@ mod test {
assert!(!store.users_for_key_query().contains(device.user_id())); assert!(!store.users_for_key_query().contains(device.user_id()));
} }
#[tokio::test(threaded_scheduler)] #[tokio::test(flavor = "multi_thread")]
async fn device_saving() { async fn device_saving() {
let (_account, store, dir) = get_loaded_store().await; let (_account, store, dir) = get_loaded_store().await;
let device = get_device(); let device = get_device();
@ -2285,7 +2285,7 @@ mod test {
assert_eq!(user_devices.values().next().unwrap(), &device); assert_eq!(user_devices.values().next().unwrap(), &device);
} }
#[tokio::test(threaded_scheduler)] #[tokio::test(flavor = "multi_thread")]
async fn device_deleting() { async fn device_deleting() {
let (_account, store, dir) = get_loaded_store().await; let (_account, store, dir) = get_loaded_store().await;
let device = get_device(); let device = get_device();
@ -2324,7 +2324,7 @@ mod test {
assert!(loaded_device.is_none()); assert!(loaded_device.is_none());
} }
#[tokio::test(threaded_scheduler)] #[tokio::test(flavor = "multi_thread")]
async fn user_saving() { async fn user_saving() {
let dir = tempdir().unwrap(); let dir = tempdir().unwrap();
let tmpdir_path = dir.path().to_str().unwrap(); let tmpdir_path = dir.path().to_str().unwrap();
@ -2419,7 +2419,7 @@ mod test {
assert!(loaded_user.own().unwrap().is_verified()) assert!(loaded_user.own().unwrap().is_verified())
} }
#[tokio::test(threaded_scheduler)] #[tokio::test(flavor = "multi_thread")]
async fn private_identity_saving() { async fn private_identity_saving() {
let (_, store, _dir) = get_loaded_store().await; let (_, store, _dir) = get_loaded_store().await;
assert!(store.load_identity().await.unwrap().is_none()); assert!(store.load_identity().await.unwrap().is_none());
@ -2435,7 +2435,7 @@ mod test {
assert_eq!(identity.user_id(), loaded_identity.user_id()); assert_eq!(identity.user_id(), loaded_identity.user_id());
} }
#[tokio::test(threaded_scheduler)] #[tokio::test(flavor = "multi_thread")]
async fn key_value_saving() { async fn key_value_saving() {
let (_, store, _dir) = get_loaded_store().await; let (_, store, _dir) = get_loaded_store().await;
let key = "test_key".to_string(); let key = "test_key".to_string();
@ -2450,7 +2450,7 @@ mod test {
assert!(store.get_value(&key).await.unwrap().is_none()); assert!(store.get_value(&key).await.unwrap().is_none());
} }
#[tokio::test(threaded_scheduler)] #[tokio::test(flavor = "multi_thread")]
async fn olm_hash_saving() { async fn olm_hash_saving() {
let (_, store, _dir) = get_loaded_store().await; let (_, store, _dir) = get_loaded_store().await;