Skip to content

Commit e9e7bc3

Browse files
start debugging wasm builds
1 parent c0b4280 commit e9e7bc3

File tree

6 files changed

+21
-8
lines changed

6 files changed

+21
-8
lines changed

Cargo.lock

Lines changed: 12 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

iroh-relay/src/quic.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,11 @@ mod tests {
285285
use std::net::Ipv4Addr;
286286

287287
use anyhow::Context;
288-
use n0_future::{task::AbortOnDropHandle, time};
288+
use n0_future::{
289+
task::AbortOnDropHandle,
290+
time::{self, Instant},
291+
};
289292
use quinn::crypto::rustls::QuicServerConfig;
290-
use tokio::time::Instant;
291293
use tracing::{debug, info, info_span, Instrument};
292294
use tracing_test::traced_test;
293295
use webpki_types::PrivatePkcs8KeyDer;

iroh/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ getrandom = { version = "0.3.2", features = ["wasm_js"] }
134134

135135
# target-common test/dev dependencies
136136
[dev-dependencies]
137+
console_error_panic_hook = "0.1"
137138
postcard = { version = "1.1.1", features = ["use-std"] }
138139
testresult = "0.4.0"
139140
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

iroh/src/endpoint.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2214,12 +2214,9 @@ fn is_cgi() -> bool {
22142214
// https://github.com/n0-computer/iroh/issues/1183
22152215
#[cfg(test)]
22162216
mod tests {
2217-
2218-
use std::time::Instant;
2219-
22202217
use iroh_metrics::MetricsSource;
22212218
use iroh_relay::http::Protocol;
2222-
use n0_future::{task::AbortOnDropHandle, StreamExt};
2219+
use n0_future::{task::AbortOnDropHandle, time::Instant, StreamExt};
22232220
use rand::SeedableRng;
22242221
use testresult::TestResult;
22252222
use tracing::{error_span, info, info_span, Instrument};

iroh/src/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ impl<T: Future> Future for MaybeFuture<T> {
7373
mod tests {
7474
use std::pin::pin;
7575

76-
use tokio::time::Duration;
76+
use n0_future::time::Duration;
7777

7878
use super::*;
7979

iroh/tests/integration.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ const ECHO_ALPN: &[u8] = b"echo";
3434

3535
#[test]
3636
async fn simple_node_id_based_connection_transfer() -> TestResult {
37+
std::panic::set_hook(Box::new(console_error_panic_hook::hook));
38+
3739
setup_logging();
3840

3941
let client = Endpoint::builder().discovery_n0().bind().await?;

0 commit comments

Comments
 (0)