clean up tests. remove placeholder assert-true tests, fix replay

protection and NAT test logic, fix MWP connection test peer ID
registration, use atomic port counter for test parallelism
This commit is contained in:
2026-02-10 20:13:54 -03:00
parent a44af22739
commit b7d013a272
12 changed files with 19 additions and 169 deletions

View File

@@ -17,13 +17,11 @@ const PieceHash = files.hash.PieceHash;
const network = @import("network");
const PeerId = network.peer.PeerId;
// Port allocation for tests
var next_port: u16 = 19401;
// Port allocation for tests (atomic for parallel test safety)
var next_port = std.atomic.Value(u16).init(19401);
fn getNextPort() u16 {
const port = next_port;
next_port += 1;
return port;
return next_port.fetchAdd(1, .acq_rel);
}
fn createTestConfig(port: u16) P2PConfig {