Skip to content

Commit bd4c158

Browse files
committed
relay-pool: add timeout in test_subscribe_ban_relay
Signed-off-by: Yuki Kishimoto <[email protected]>
1 parent 2f2f8ad commit bd4c158

File tree

1 file changed

+7
-4
lines changed
  • crates/nostr-relay-pool/src/relay

1 file changed

+7
-4
lines changed

crates/nostr-relay-pool/src/relay/mod.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,10 +1215,13 @@ mod tests {
12151215
.unwrap();
12161216

12171217
// Keep up the test
1218-
relay
1219-
.handle_notifications(|_| async { Ok(false) })
1220-
.await
1221-
.unwrap();
1218+
time::timeout(
1219+
Some(Duration::from_secs(10)),
1220+
relay.handle_notifications(|_| async { Ok(false) }),
1221+
)
1222+
.await
1223+
.unwrap()
1224+
.unwrap();
12221225

12231226
assert_eq!(relay.status(), RelayStatus::Banned);
12241227

0 commit comments

Comments
 (0)