aboutsummaryrefslogtreecommitdiffstats
path: root/src/wireguard/router/tests.rs
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2020-02-16 20:25:31 +0100
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2020-02-16 20:25:31 +0100
commitead75828cdaa5253e57b5792b51e3d99a4a78ea0 (patch)
tree97fcba5fe19efcb52c0e25cebe4ec359c0d503c8 /src/wireguard/router/tests.rs
parentFixed EINVAL on read4/6 from invalid namelen (diff)
downloadwireguard-rs-ead75828cdaa5253e57b5792b51e3d99a4a78ea0.tar.xz
wireguard-rs-ead75828cdaa5253e57b5792b51e3d99a4a78ea0.zip
Simplified router code
Diffstat (limited to '')
-rw-r--r--src/wireguard/router/tests.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/wireguard/router/tests.rs b/src/wireguard/router/tests.rs
index 15db368..3d5c79b 100644
--- a/src/wireguard/router/tests.rs
+++ b/src/wireguard/router/tests.rs
@@ -50,7 +50,6 @@ mod tests {
}))
}
- #[allow(dead_code)]
fn reset(&self) {
self.0.send.lock().unwrap().clear();
self.0.recv.lock().unwrap().clear();
@@ -104,9 +103,9 @@ mod tests {
}
}
- // wait for scheduling (VERY conservative)
+ // wait for scheduling
fn wait() {
- thread::sleep(Duration::from_millis(30));
+ thread::sleep(Duration::from_millis(15));
}
fn init() {
@@ -162,7 +161,7 @@ mod tests {
};
let msg = make_packet_padded(1024, src, dst, 0);
- // every iteration sends 10 MB
+ // every iteration sends 10 GB
b.iter(|| {
opaque.store(0, Ordering::SeqCst);
while opaque.load(Ordering::Acquire) < 10 * 1024 * 1024 {