etcd-io/gofail

`sleep(1000)->100.0%panic` ,panic is not executed

fananchong opened this issue · 2 comments

func (t *terms) eval() (interface{}, error) {
	t.mu.Lock()
	defer t.mu.Unlock()
	for _, term := range t.chain {
		if term.mods.allow() {
			return term.do(), nil
		}
	}
	return nil, nil
}

return term.do(), nil causes the following term to not be executed

ahrtr commented

It's a real problem. Probably we should redefine the format to support both AND and OR.

  • AND: evaluate all terms;
  • OR: evaluate the first allowed term.
ahrtr commented

@serathius Any interest on this feature? cc @ptabor as well.