# Verify that we can issue a single dispatch, and that it gets removed
# appropriately.

init
----

dispatch
node=n1 range=r1 pri=normal-pri store=s1 up-to-log-position=4/20
----

# Verify that the metrics show 1 pending node, with 1 pending flow tokens
# dispatch.
metrics
----
pending-nodes=1
[regular] pending=1 coalesced=0 dispatch{local=0 remote=1}
[elastic] pending=0 coalesced=0 dispatch{local=0 remote=0}

pending-dispatch
----
node=n1

pending-dispatch-for node=n1
----
range=r1 pri=normal-pri store=s1 up-to-log-position=log-position=4/20

pending-dispatch
----

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

# Verify that the metrics show 0 pending nodes, with 0 pending flow
# tokens dispatches.
metrics
----
pending-nodes=0
[regular] pending=0 coalesced=0 dispatch{local=0 remote=1}
[elastic] pending=0 coalesced=0 dispatch{local=0 remote=0}

# vim:ft=sh
