jepsen
jepsen copied to clipboard
jepsen.nemesis/compose handles AbstractMethodError thrown by constituent nemeses incorrectly
The jepsen.nemesis/compose
function calls jepsen.nemesis/setup-compat!
on each of the constituent nemeses. However, if any of those constituent nemeses are jepsen.client.Client
instances that don't implement the 3-arity setup!
method (because they implement the new-style open!
method), then an AbstractMethodError
exception is thrown from here and caught in the outer frame for the composite nemesis's call of jepsen.nemesis/setup-compat!
. This causes the composite nemesis to be treated as not implementing the 2-arity setup!
method, and for the original nemesis
argument to be returned unchanged.
I think that jepsen.nemesis/setup-compat!
should probably just instead call jepsen.client/open-compat!
so it continues to support composing both jepsen.nemesis.Nemesis
and jepsen.client.Client
instances regardless of whether they're defined using the old-style 3-arity setup!
method or the new-style open!
method.
Ah, yeah, I think you're right. Since you have a failing case handy, would you like to submit a PR?