# Verify that the local dispatch fast-path works as expected.

# Initialize the dispatch on n1.
init node=n1
----

# Issue dispatches to n1 and n2.
dispatch
node=n1 range=r1 pri=normal-pri store=s1 up-to-log-position=4/20
node=n2 range=r2 pri=normal-pri store=s2 up-to-log-position=4/20
----

# Verify that the metrics shows only 1 pending node (the remote one, n2) and
# increments dispatch{local=...} metric appopriately.
metrics
----
pending-nodes=1
[regular] pending=1 coalesced=0 dispatch{local=1 remote=1}
[elastic] pending=0 coalesced=0 dispatch{local=0 remote=0}

pending-dispatch
----
node=n2

pending-dispatch-for node=n1
----

# vim:ft=sh
