refactor(oauth): remove superfluous join in QR login tests
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
This commit is contained in:
committed by
Damir Jelić
parent
18654444b6
commit
a50ecb5b18
@@ -485,7 +485,7 @@ impl<'a> LoginWithGeneratedQrCode<'a> {
|
||||
#[cfg(all(test, not(target_family = "wasm")))]
|
||||
mod test {
|
||||
use assert_matches2::{assert_let, assert_matches};
|
||||
use futures_util::{StreamExt, join};
|
||||
use futures_util::StreamExt;
|
||||
use matrix_sdk_base::crypto::types::{SecretsBundle, qr_login::QrCodeModeData};
|
||||
use matrix_sdk_common::executor::spawn;
|
||||
use matrix_sdk_test::async_test;
|
||||
@@ -644,15 +644,10 @@ mod test {
|
||||
let alice_task =
|
||||
spawn(async { grant_login(alice, receiver, AliceBehaviour::HappyPath).await });
|
||||
|
||||
join!(
|
||||
async {
|
||||
login_bob.await.expect("Bob should be able to login");
|
||||
},
|
||||
async {
|
||||
alice_task.await.expect("Alice should have completed it's task successfully");
|
||||
},
|
||||
async { updates_task.await.unwrap() }
|
||||
);
|
||||
// Wait for all tasks to finish.
|
||||
login_bob.await.expect("Bob should be able to login");
|
||||
alice_task.await.expect("Alice should have completed it's task successfully");
|
||||
updates_task.await.unwrap();
|
||||
|
||||
assert!(bob.encryption().cross_signing_status().await.unwrap().is_complete());
|
||||
let own_identity =
|
||||
@@ -832,11 +827,10 @@ mod test {
|
||||
.await
|
||||
});
|
||||
|
||||
join!(
|
||||
async { bob_login.await.expect("Bob should be able to login") },
|
||||
async { alice_task.await.expect("Alice should have completed it's task successfully") },
|
||||
async { updates_task.await.unwrap() }
|
||||
);
|
||||
// Wait for all tasks to finish.
|
||||
bob_login.await.expect("Bob should be able to login");
|
||||
alice_task.await.expect("Alice should have completed it's task successfully");
|
||||
updates_task.await.unwrap();
|
||||
|
||||
assert!(bob.encryption().cross_signing_status().await.unwrap().is_complete());
|
||||
let own_identity =
|
||||
@@ -937,11 +931,10 @@ mod test {
|
||||
.await
|
||||
});
|
||||
|
||||
join!(
|
||||
async { bob_login.await.expect("Bob should be able to login") },
|
||||
async { alice_task.await.expect("Alice should have completed it's task successfully") },
|
||||
async { updates_task.await.unwrap() }
|
||||
);
|
||||
// Wait for all tasks to finish.
|
||||
bob_login.await.expect("Bob should be able to login");
|
||||
alice_task.await.expect("Alice should have completed it's task successfully");
|
||||
updates_task.await.unwrap();
|
||||
|
||||
assert!(bob.encryption().cross_signing_status().await.unwrap().is_complete());
|
||||
let own_identity =
|
||||
|
||||
Reference in New Issue
Block a user