Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions launchdarkly-server-sdk/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,16 +273,6 @@ impl Client {
Ok(true)
}

/// This is an async method that will resolve once initialization is complete.
/// Initialization being complete does not mean that initialization was a success.
/// The return value from the method indicates if the client successfully initialized.
#[deprecated(
note = "blocking without a timeout is discouraged, use wait_for_initialization instead"
)]
pub async fn initialized_async(&self) -> bool {
self.initialized_async_internal().await
}

/// This is an async method that will resolve once initialization is complete or the specified
/// timeout has occurred.
///
Expand Down Expand Up @@ -861,19 +851,6 @@ mod tests {
is_send_and_sync::<Client>()
}

#[tokio::test]
async fn client_asynchronously_initializes() {
let (client, _event_rx) = make_mocked_client_with_delay(1000, false, false);
client.start_with_default_executor();

let now = Instant::now();
let initialized = client.initialized_async().await;
let elapsed_time = now.elapsed();
assert!(initialized);
// Give ourself a good margin for thread scheduling.
assert!(elapsed_time.as_millis() > 500)
}

#[tokio::test]
async fn client_asynchronously_initializes_within_timeout() {
let (client, _event_rx) = make_mocked_client_with_delay(1000, false, false);
Expand Down