Skip to content

Commit ca85add

Browse files
committed
Merge branch 'main' after v0.1.8 release
2 parents 40f4317 + e72c64d commit ca85add

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ aider_stdlib_map.md
33
# Local tools and notes
44
.local-tools/
55

6+
# Release artifacts (downloaded binaries)
7+
release-artifacts/
68
### Rust ###
79
# Generated by Cargo
810
# will have compiled files and executables

crates/core/src/node/network_bridge/handshake.rs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,7 +1467,7 @@ mod tests {
14671467

14681468
let gw_inbound = async {
14691469
let event =
1470-
tokio::time::timeout(Duration::from_secs(1), handler.wait_for_events()).await??;
1470+
tokio::time::timeout(Duration::from_secs(15), handler.wait_for_events()).await??;
14711471
match event {
14721472
Event::InboundConnection { conn, .. } => {
14731473
assert_eq!(conn.remote_addr(), remote_addr);
@@ -1522,7 +1522,7 @@ mod tests {
15221522

15231523
let gw_inbound = async {
15241524
let event =
1525-
tokio::time::timeout(Duration::from_secs(1), handler.wait_for_events()).await??;
1525+
tokio::time::timeout(Duration::from_secs(15), handler.wait_for_events()).await??;
15261526
match event {
15271527
Event::InboundConnectionRejected { peer_id } => {
15281528
assert_eq!(peer_id.addr, remote_addr);
@@ -1589,7 +1589,7 @@ mod tests {
15891589

15901590
let peer_inbound = async {
15911591
let event =
1592-
tokio::time::timeout(Duration::from_secs(1), handler.wait_for_events()).await??;
1592+
tokio::time::timeout(Duration::from_secs(15), handler.wait_for_events()).await??;
15931593
match event {
15941594
Event::OutboundGatewayConnectionSuccessful { peer_id, .. } => {
15951595
assert_eq!(peer_id.addr, remote_addr);
@@ -1624,7 +1624,7 @@ mod tests {
16241624

16251625
let peer_inbound = async {
16261626
let event =
1627-
tokio::time::timeout(Duration::from_secs(1), handler.wait_for_events()).await??;
1627+
tokio::time::timeout(Duration::from_secs(15), handler.wait_for_events()).await??;
16281628
match event {
16291629
Event::OutboundConnectionFailed { peer_id, error } => {
16301630
let addr: SocketAddr = ([127, 0, 0, 1], 10000).into();
@@ -1647,7 +1647,7 @@ mod tests {
16471647

16481648
#[tokio::test]
16491649
async fn test_gw_to_peer_outbound_conn_forwarded() -> anyhow::Result<()> {
1650-
// crate::config::set_logger(Some(tracing::level_filters::LevelFilter::DEBUG));
1650+
// crate::config::set_logger(Some(tracing::level_filters::LevelFilter::DEBUG), None);
16511651
let gw_addr: SocketAddr = ([127, 0, 0, 1], 10000).into();
16521652
let peer_addr: SocketAddr = ([127, 0, 0, 1], 10001).into();
16531653
let joiner_addr: SocketAddr = ([127, 0, 0, 1], 10002).into();
@@ -1682,6 +1682,9 @@ mod tests {
16821682
.establish_inbound_conn(joiner_addr, joiner_pub_key, None)
16831683
.await;
16841684

1685+
// Give some time for the events to be processed
1686+
tokio::time::sleep(Duration::from_millis(100)).await;
1687+
16851688
// TODO: maybe simulate forwarding back all expected responses
16861689

16871690
Ok::<_, anyhow::Error>(())
@@ -1691,7 +1694,7 @@ mod tests {
16911694
let mut third_party = None;
16921695
loop {
16931696
let event =
1694-
tokio::time::timeout(Duration::from_secs(1), gw_handler.wait_for_events())
1697+
tokio::time::timeout(Duration::from_secs(15), gw_handler.wait_for_events())
16951698
.await??;
16961699
match event {
16971700
Event::InboundConnection {
@@ -1978,7 +1981,7 @@ mod tests {
19781981

19791982
let peer_inbound = async {
19801983
let event =
1981-
tokio::time::timeout(Duration::from_secs(1), handler.wait_for_events()).await??;
1984+
tokio::time::timeout(Duration::from_secs(15), handler.wait_for_events()).await??;
19821985
let _conn = match event {
19831986
Event::OutboundGatewayConnectionSuccessful {
19841987
peer_id,
@@ -2022,7 +2025,7 @@ mod tests {
20222025

20232026
let peer_inbound = async {
20242027
let event =
2025-
tokio::time::timeout(Duration::from_secs(1), handler.wait_for_events()).await??;
2028+
tokio::time::timeout(Duration::from_secs(15), handler.wait_for_events()).await??;
20262029
match event {
20272030
Event::OutboundConnectionFailed { peer_id, error } => {
20282031
assert_eq!(peer_id.addr, peer_addr);
@@ -2066,7 +2069,7 @@ mod tests {
20662069

20672070
let peer_inbound = async {
20682071
let event =
2069-
tokio::time::timeout(Duration::from_secs(1), handler.wait_for_events()).await??;
2072+
tokio::time::timeout(Duration::from_secs(15), handler.wait_for_events()).await??;
20702073
match event {
20712074
Event::OutboundConnectionSuccessful {
20722075
peer_id,

crates/core/tests/operations.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2250,6 +2250,7 @@ async fn test_gateway_packet_size_change_after_60s() -> TestResult {
22502250
}
22512251

22522252
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
2253+
#[ignore = "Long-running test (75s) - run with --ignored flag"]
22532254
async fn test_production_decryption_error_scenario() -> TestResult {
22542255
freenet::config::set_logger(Some(LevelFilter::DEBUG), None);
22552256

0 commit comments

Comments
 (0)