We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
test_subscription_lagged_error
1 parent b25d02c commit 6070ceeCopy full SHA for 6070cee
src/robust_provider/subscription.rs
@@ -1015,6 +1015,10 @@ mod tests {
1015
// Mine more blocks than channel can hold without consuming
1016
provider.anvil_mine(Some(MAX_CHANNEL_SIZE as u64 + 1), None).await?;
1017
1018
+ // Allow time for block notifications to propagate through WebSocket
1019
+ // and fill the subscription channel
1020
+ sleep(BUFFER_TIME).await;
1021
+
1022
// First recv should return Lagged error (skipped some blocks)
1023
let result = subscription.recv().await;
1024
assert!(matches!(result, Err(Error::Lagged(_))));
0 commit comments