Skip to content

Commit 95767ba

Browse files
author
“ramfox”
committed
upgrade to [email protected], remove iroh_test dep
1 parent 7a67148 commit 95767ba

File tree

12 files changed

+261
-80
lines changed

12 files changed

+261
-80
lines changed

Cargo.lock

Lines changed: 38 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ genawaiter = { version = "0.99.1", features = ["futures03"] }
4040
hashlink = { version = "0.9.0", optional = true }
4141
hex = "0.4.3"
4242
indicatif = { version = "0.17.8", optional = true }
43-
iroh-base = { version = "0.31" }
43+
iroh-base = { version = "0.32" }
4444
iroh-io = { version = "0.6.0", features = ["stats"] }
4545
iroh-metrics = { version = "0.31", default-features = false }
46-
iroh = "0.31"
46+
iroh = "0.32"
4747
nested_enum_utils = { version = "0.1.0", optional = true }
4848
num_cpus = "1.15.0"
4949
oneshot = "0.1.8"
@@ -77,11 +77,11 @@ walkdir = { version = "2.5.0", optional = true }
7777

7878
# Examples
7979
console = { version = "0.15.8", optional = true }
80+
tracing-test = "0.2.5"
8081

8182
[dev-dependencies]
8283
http-body = "1.0"
83-
iroh-test = { version = "0.31" }
84-
iroh = { version = "0.31", features = ["test-utils"] }
84+
iroh = { version = "0.32", features = ["test-utils"] }
8585
futures-buffered = "0.2.4"
8686
proptest = "1.0.0"
8787
serde_json = "1.0.107"
@@ -184,8 +184,3 @@ debug-assertions = false
184184
opt-level = 3
185185
panic = 'abort'
186186
incremental = false
187-
188-
[patch.crates-io]
189-
iroh-base = { git = "https://github.com/n0-computer/iroh.git", branch = "main" }
190-
iroh = { git = "https://github.com/n0-computer/iroh.git", branch = "main" }
191-
quic-rpc = { git = "https://github.com/n0-computer/quic-rpc.git", branch = "release-prep" }

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Here is a basic example of how to set up `iroh-blobs` with `iroh`:
3333
```rust
3434
use iroh::{protocol::Router, Endpoint};
3535
use iroh_blobs::net_protocol::Blobs;
36+
use iroh_blobs::store::traits::Store;
3637

3738
#[tokio::main]
3839
async fn main() -> anyhow::Result<()> {

src/downloader/test.rs

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use std::{
77
use anyhow::anyhow;
88
use futures_util::future::FutureExt;
99
use iroh::SecretKey;
10+
use tracing_test::traced_test;
1011

1112
use super::*;
1213
use crate::{
@@ -48,8 +49,6 @@ impl Downloader {
4849
let lp = LocalPool::default();
4950
lp.spawn_detached(move || async move {
5051
// we want to see the logs of the service
51-
let _guard = iroh_test::logging::setup();
52-
5352
let service = Service::new(getter, dialer, concurrency_limits, retry_config, msg_rx);
5453
service.run().await
5554
});
@@ -66,8 +65,8 @@ impl Downloader {
6665

6766
/// Tests that receiving a download request and performing it doesn't explode.
6867
#[tokio::test]
68+
#[traced_test]
6969
async fn smoke_test() {
70-
let _guard = iroh_test::logging::setup();
7170
let dialer = dialer::TestingDialer::default();
7271
let getter = getter::TestingGetter::default();
7372
let concurrency_limits = ConcurrencyLimits::default();
@@ -90,8 +89,8 @@ async fn smoke_test() {
9089

9190
/// Tests that multiple intents produce a single request.
9291
#[tokio::test]
92+
#[traced_test]
9393
async fn deduplication() {
94-
let _guard = iroh_test::logging::setup();
9594
let dialer = dialer::TestingDialer::default();
9695
let getter = getter::TestingGetter::default();
9796
// make request take some time to ensure the intents are received before completion
@@ -123,8 +122,8 @@ async fn deduplication() {
123122
/// Tests that the request is cancelled only when all intents are cancelled.
124123
#[ignore = "flaky"]
125124
#[tokio::test]
125+
#[traced_test]
126126
async fn cancellation() {
127-
let _guard = iroh_test::logging::setup();
128127
let dialer = dialer::TestingDialer::default();
129128
let getter = getter::TestingGetter::default();
130129
// make request take some time to ensure cancellations are received on time
@@ -159,8 +158,8 @@ async fn cancellation() {
159158
/// maximum number of concurrent requests is not exceed.
160159
/// NOTE: This is internally tested by [`Service::check_invariants`].
161160
#[tokio::test]
161+
#[traced_test]
162162
async fn max_concurrent_requests_total() {
163-
let _guard = iroh_test::logging::setup();
164163
let dialer = dialer::TestingDialer::default();
165164
let getter = getter::TestingGetter::default();
166165
// make request take some time to ensure concurreny limits are hit
@@ -202,8 +201,8 @@ async fn max_concurrent_requests_total() {
202201
/// the maximum number of requests per peer is still respected.
203202
/// NOTE: This is internally tested by [`Service::check_invariants`].
204203
#[tokio::test]
204+
#[traced_test]
205205
async fn max_concurrent_requests_per_peer() {
206-
let _guard = iroh_test::logging::setup();
207206
let dialer = dialer::TestingDialer::default();
208207
let getter = getter::TestingGetter::default();
209208
// make request take some time to ensure concurreny limits are hit
@@ -239,8 +238,8 @@ async fn max_concurrent_requests_per_peer() {
239238
/// state. The download then finishes, and we make sure that all events are emitted properly, and
240239
/// the progress state of the handles converges.
241240
#[tokio::test]
241+
#[traced_test]
242242
async fn concurrent_progress() {
243-
let _guard = iroh_test::logging::setup();
244243
let dialer = dialer::TestingDialer::default();
245244
let getter = getter::TestingGetter::default();
246245

@@ -356,8 +355,8 @@ async fn concurrent_progress() {
356355
}
357356

358357
#[tokio::test]
358+
#[traced_test]
359359
async fn long_queue() {
360-
let _guard = iroh_test::logging::setup();
361360
let dialer = dialer::TestingDialer::default();
362361
let getter = getter::TestingGetter::default();
363362
let concurrency_limits = ConcurrencyLimits {
@@ -394,8 +393,8 @@ async fn long_queue() {
394393
/// If a download errors with [`FailureAction::DropPeer`], make sure that the peer is not dropped
395394
/// while other transfers are still running.
396395
#[tokio::test]
396+
#[traced_test]
397397
async fn fail_while_running() {
398-
let _guard = iroh_test::logging::setup();
399398
let dialer = dialer::TestingDialer::default();
400399
let getter = getter::TestingGetter::default();
401400
let (downloader, _lp) =
@@ -432,8 +431,8 @@ async fn fail_while_running() {
432431
}
433432

434433
#[tokio::test]
434+
#[traced_test]
435435
async fn retry_nodes_simple() {
436-
let _guard = iroh_test::logging::setup();
437436
let dialer = dialer::TestingDialer::default();
438437
let getter = getter::TestingGetter::default();
439438
let (downloader, _lp) =
@@ -453,8 +452,8 @@ async fn retry_nodes_simple() {
453452
}
454453

455454
#[tokio::test]
455+
#[traced_test]
456456
async fn retry_nodes_fail() {
457-
let _guard = iroh_test::logging::setup();
458457
let dialer = dialer::TestingDialer::default();
459458
let getter = getter::TestingGetter::default();
460459
let config = RetryConfig {
@@ -491,8 +490,8 @@ async fn retry_nodes_fail() {
491490
}
492491

493492
#[tokio::test]
493+
#[traced_test]
494494
async fn retry_nodes_jump_queue() {
495-
let _guard = iroh_test::logging::setup();
496495
let dialer = dialer::TestingDialer::default();
497496
let getter = getter::TestingGetter::default();
498497
let concurrency_limits = ConcurrencyLimits {

src/hash.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ impl<'de> Deserialize<'de> for HashAndFormat {
417417
#[cfg(test)]
418418
mod tests {
419419

420-
use iroh_test::{assert_eq_hex, hexdump::parse_hexdump};
420+
use crate::{assert_eq_hex, util::hexdump::parse_hexdump};
421421
use serde_test::{assert_tokens, Configure, Token};
422422

423423
use super::*;

src/protocol.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ impl TryFrom<VarInt> for Closed {
483483

484484
#[cfg(test)]
485485
mod tests {
486-
use iroh_test::{assert_eq_hex, hexdump::parse_hexdump};
486+
use crate::{assert_eq_hex, util::hexdump::parse_hexdump};
487487

488488
use super::{GetRequest, Request};
489489

src/protocol/range_spec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ impl<'a> Iterator for NonEmptyRequestRangeSpecIter<'a> {
354354
mod tests {
355355
use std::ops::Range;
356356

357-
use iroh_test::{assert_eq_hex, hexdump::parse_hexdump};
357+
use crate::{assert_eq_hex, util::hexdump::parse_hexdump};
358358
use proptest::prelude::*;
359359

360360
use super::*;

0 commit comments

Comments
 (0)