arti-testing: support for simulated TCP breakage
2 unresolved threads
2 unresolved threads
This is the second part of my work on arti-testing
, to help simulate failures for #329 (closed).
This branch makes it possible for TCP connections to fail with an IO error, time out, or succeed but ignore all data. These failures can be enabled immediately, after a delay, or in a particular stage. Failures can be set up for all TCP connections, IPv4 only, IPv6 only, or non-443.
Merge request reports
Activity
assigned to @nickm
requested review from @eta
added 1 commit
- 84536a9c - arti-testing: reverse two attrs in attempt to fix min-versions
added 1 commit
- a460de6e - arti-testing: reverse two more attrs in attempt to fix min-versions
- crates/arti-testing/src/rt/badtcp.rs 0 → 100644
7 use anyhow::anyhow; 8 use async_trait::async_trait; 9 use futures::io::{AsyncRead, AsyncWrite}; 10 use pin_project::pin_project; 11 use rand::{thread_rng, Rng}; 12 use std::io::{Error as IoError, ErrorKind as IoErrorKind, Result as IoResult}; 13 use std::net::SocketAddr; 14 use std::pin::Pin; 15 use std::str::FromStr; 16 use std::sync::{Arc, Mutex}; 17 use std::task::{Context, Poll}; 18 use std::time::Duration; 19 20 /// An action that we can take upon trying to make a TCP connection. 21 #[derive(Debug, Clone)] 22 pub(crate) enum Action { enabled an automatic merge when the pipeline for d1b15143 succeeds
mentioned in commit 98c5c5b8
Please register or sign in to reply