The reviewer went over the third round (the entry before this one) and found four things in it, and two sentences that said more than was known. Three of the four are fixed here, each with a test that fails without its fix; the fourth is not taken up, and why is below. The counts are of the gateway's, the follower's, the lifecycle and the session tests, 80 of them, run against each removal alone.
The round before put the router in place before the port opened and took it away after the port closed. That
covered what arrives; it did not cover what had arrived. Closing the listener leaves handlers already running,
and one held between reading its request and routing it found the router gone when it went on: a
create-session naming a node minted a session in the gateway's own JVM after stop! had returned.
The router was a global the role installed and removed, and no order of installing and removing covers a request in flight. It is now part of what a gateway's server is started with, and goes with every exchange that server accepts. A stopped gateway has nobody attached, so the held request is routed to nobody and refused. The test holds a real request at that point, stops the gateway and lets the request go. This fix is not a line to remove, so its check was the test run against the commit before: one failure, a session minted here.
stop! included. It is held where a stream is held: watched for silence, and closed by a stop.
Published nowhere again: 2 failures, one for the watch and one for the stop.The cadence a welcome sets is now that attachment's alone: the next attach is given the opening cadence to be welcomed in, not the three long beats of the gateway it lost.
The round before had the transport open /gateway beside its own doors, from an option. The option went
through init! like any other, so a host could name a door too, and a path the server refused threw after the
port was bound: a server that has bound and never started does not give its port back. What a role adds to the
transport is now an argument of its own, which init! builds and a host's options never reach, and the server
is made unbound, given its doors, and bound last. The port taken first again: the test errors, the retry
refused its port. A host's options passed through as wiring: 1 failure.
The handshake changed on the follower's side, and the suite plays the gateway from a script, so a gateway and a follower were run as separate processes on one machine again. The follower was started first and dialled a gateway that was not there; it attached when one came up. A session opened on the node through the gateway evaluated there. The gateway was killed and started again, the follower attached afresh, and the same session was routed. No fault was injected between the two; those are the suite's.
The attachment id changed what a follower must say, and the wire is still revision 1, so a follower built from the commit before attaches to a gateway built from this one and is then disowned at every beat. Both are commits on a branch that has not been released, and no released follower or gateway speaks any revision at all: 1 is the wire as it first ships. The number counts wires that hosts can be running, and none is.
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |