fn check_success<T: fmt::Debug>(
        &mut self,
        meta: &StepMeta,
        res: &Result<T, Error>,
        require_succeed: bool,
    ) {
        match (require_succeed, res) {
            (true, Err(err)) => self.errors.push(format!(
                "expected success but got error {:?}: {}",
                meta.req_id, err
            )),
            _ => {}
        }
    }
/// Enqueues an error if the given result was an error but we know
/// externally that it should have succeeded.
///
/// This used to also require failure when it was known externally that it
/// shouldn't have been able to work (e.g. a write when storage is
/// unavailable). That worked when nemesis was totally deterministic, but
/// was already becoming a maintenance burden. As we move toward pipelining
/// requests, running them concurrently in threads, and adding periods of
/// non-determinism to the unreliable storage, it will require trinary logic
/// (yes/no/maybe), which gets surprisingly complicated.
///
/// Stepping back, nemesis's purpose is to verify that we adhere to our
/// external API guarantees. This means assertions on histories of
/// request/response pairs and outputs of dataflow operators, not anything
/// around what to expect given detailed history of the availability of
/// external systems.
///
/// However, we do keep this one "liveness" check around so we don't
/// accidentally pass validation by simply erroring every request (which is
/// a valid, but not useful history).
Enqueues an error if the given result was an error but we know
externally that it should have succeeded.

This used to also require failure when it was known externally that it
shouldn't have been able to work . That worked when nemesis was totally deterministic, but
was already becoming a maintenance burden. As we move toward pipelining
requests, running them concurrently in threads, and adding periods of
non-determinism to the unreliable storage, it will require trinary logic
(yes/no/maybe), which gets surprisingly complicated.

Stepping back, nemesis's purpose is to verify that we adhere to our
external API guarantees. This means assertions on histories of
request/response pairs and outputs of dataflow operators, not anything
around what to expect given detailed history of the availability of
external systems.

However, we do keep this one "liveness" check around so we don't
accidentally pass validation by simply erroring every request (which is
a valid, but not useful history).
Enqueues an error if the given result was an error but we know externally that it should have succeeded . This used to also require failure when it was known externally that it shouldn ' t have been able to work . That worked when nemesis was totally deterministic but was already becoming a maintenance burden . As we move toward pipelining requests running them concurrently in threads and adding periods of non - determinism to the unreliable storage it will require trinary logic ( yes / no / maybe ) which gets surprisingly complicated . Stepping back nemesis ' s purpose is to verify that we adhere to our external API guarantees . This means assertions on histories of request / response pairs and outputs of dataflow operators not anything around what to expect given detailed history of the availability of external systems . However we do keep this one " liveness " check around so we don ' t accidentally pass validation by simply erroring every request ( which is a valid but not useful history ) .
fn check_success<T: fmt::Debug>(
        &mut self,
        meta: &StepMeta,
        res: &Result<T, Error>,
        require_succeed: bool,
    ) {
        match (require_succeed, res) {
            (true, Err(err)) => self.errors.push(format!(
                "expected success but got error {:?}: {}",
                meta.req_id, err
            )),
            _ => {}
        }
    }
fn check_success < T : fmt :: Debug > ( & mut self , meta : & StepMeta , res : & Result < T , Error > , require_succeed : bool , ) { match ( require_succeed , res ) { ( true , Err ( err ) ) => self . errors . push ( format ! ( " " meta req_id err ) ) , _ => { } } }
Enqueues an error if the given result was an error but we know
externally that it should have succeeded.
Enqueues an error if the given result was an error but we know externally that it should have succeeded .
&mut self
meta
&StepMeta
res
&Result<T, Error>
require_succeed
bool
&mut self
meta
&StepMeta
res
&Result<T, Error>
require_succeed
bool