Skip to content
This repository has been archived by the owner on Jun 25, 2021. It is now read-only.

Commit

Permalink
test: don't fail test_node_drop when Error::FailedSend is returned
Browse files Browse the repository at this point in the history
  • Loading branch information
madadam committed Sep 29, 2020
1 parent 9ecfe8a commit 5e0fdfa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/drop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ mod utils;
use self::utils::*;
use anyhow::{format_err, Result};
use bytes::Bytes;
use sn_routing::{event::Event, DstLocation, NetworkParams, SrcLocation};
use sn_routing::{event::Event, DstLocation, Error, NetworkParams, SrcLocation};
use tokio::time;

#[tokio::test]
Expand All @@ -27,7 +27,11 @@ async fn test_node_drop() -> Result<()> {
nodes[0]
.0
.send_message(src, dst, Bytes::from_static(b"ping"))
.await?;
.await
.or_else(|error| match error {
Error::FailedSend => Ok(()),
_ => Err(error),
})?;

let expect_event = async {
while let Some(event) = nodes[0].1.next().await {
Expand Down

0 comments on commit 5e0fdfa

Please sign in to comment.