Hi All, does wiremock guarantee the execution orde...
# help
a
Hi All, does wiremock guarantee the execution order of ServeEventListeners defined on a specific stub?
l
I think this is pretty much undefined. I don't think WireMock makes any guarantees in this area. Also, different ServeEventListeners can execute at different request phases. So, for example, a ServeEventListener that is first in the list of ServeEventListeners could be tied to the
AFTER_COMPLETE
request phase (like the web hooks ServeEventListeners) so is actually executed at the end of a request where as ServeEventListeners further down in the list could be 'executed' in earlier request phases. However, I would imagine if all your ServeEventListeners are tied to the same request phase they would just execute in the order they are added. I haven't tested this though. Is there something you are trying to achieve that needs a specific order?
a
Not trying anything as of now. Just did not see this guarantee in the docs and wondering if we are to add some behaviour then can we rely on the order or not.
👍 1