Skip to content

Commit 4b2caa9

Browse files
committed
test(optimism): Take only one error as it causes an unbounded number of reconnects
1 parent dd63f42 commit 4b2caa9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/optimism/flashblocks/src/ws/stream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ mod tests {
333333
let stream = WsFlashBlockStream::with_connector(ws_url, messages);
334334

335335
let actual_messages: Vec<_> =
336-
stream.map(Result::unwrap_err).map(|e| format!("{e}")).collect().await;
336+
stream.take(1).map(Result::unwrap_err).map(|e| format!("{e}")).collect().await;
337337
let expected_messages = vec!["Attack attempt detected".to_owned()];
338338

339339
assert_eq!(actual_messages, expected_messages);

0 commit comments

Comments
 (0)