Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Frando committed Oct 3, 2023
1 parent 2c9feaa commit b2b53d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 6 additions & 3 deletions iroh-sync/src/net/codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ mod tests {

let (mut alice_reader, mut alice_writer) = tokio::io::split(alice);
let replica = alice_replica.clone();
let replica = replica.into_async();
let alice_task = tokio::task::spawn(async move {
run_alice::<store::memory::Store, _, _>(
&mut alice_writer,
Expand All @@ -356,7 +357,7 @@ mod tests {
futures::future::ready(
bob_replica_store_task
.open_replica(&namespace)
.map(|r| r.ok_or(AbortReason::NotAvailable)),
.map(|r| r.ok_or(AbortReason::NotAvailable).map(|r| r.into_async())),
)
},
alice_peer_id,
Expand Down Expand Up @@ -411,7 +412,7 @@ mod tests {
fn insert_messages<S: Store>(
mut rng: impl CryptoRngCore,
store: &S,
replica: &Replica<S::Instance>,
replica: &crate::sync::Replica<S::Instance>,
num_authors: usize,
msgs_per_author: usize,
key_value_fn: impl Fn(&AuthorId, usize) -> (String, String),
Expand Down Expand Up @@ -541,6 +542,7 @@ mod tests {

let (mut alice_reader, mut alice_writer) = tokio::io::split(alice);
let alice_replica = alice_store.open_replica(&namespace)?.unwrap();
let alice_replica = alice_replica.into_async();
let alice_task = tokio::task::spawn(async move {
run_alice::<S, _, _>(
&mut alice_writer,
Expand All @@ -561,7 +563,8 @@ mod tests {
futures::future::ready(
bob_store
.open_replica(&namespace)
.map(|r| r.ok_or(AbortReason::NotAvailable)),
.map(|r| r.ok_or(AbortReason::NotAvailable))
.map(|r| r.map(|r| r.into_async())),
)
},
alice_node_pubkey,
Expand Down
1 change: 0 additions & 1 deletion iroh-sync/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,6 @@ mod tests {
use rand_core::SeedableRng;

use crate::{
heads::AuthorHeads,
ranger::{Range, Store as _},
store::{self, GetFilter, Store},
};
Expand Down

0 comments on commit b2b53d0

Please sign in to comment.