Fix connect test

This commit is contained in:
Roderick van Domburg 2022-01-16 01:36:28 +01:00
parent 2065ded7b6
commit fcb21df81f
No known key found for this signature in database
GPG key ID: FE2585E713F9F30A

View file

@ -1,19 +1,14 @@
use std::time::Duration;
use librespot_core::authentication::Credentials;
use librespot_core::config::SessionConfig;
use librespot_core::session::Session;
use tokio::time::timeout;
use librespot_core::{authentication::Credentials, config::SessionConfig, session::Session};
#[tokio::test]
async fn test_connection() {
timeout(Duration::from_secs(30), async {
let result = Session::connect(
SessionConfig::default(),
Credentials::with_password("test", "test"),
None,
)
let result = Session::new(SessionConfig::default(), None)
.connect(Credentials::with_password("test", "test"))
.await;
match result {