aboutsummaryrefslogtreecommitdiffstats
path: root/src/transport/mycelium/fake_daemon.rs
Commit message (Collapse)AuthorAgeFilesLines
* mycelium: the fake daemon's tests wait for its first poll, not one moretv9 days1-6/+7
| | | | | | | | They waited for one more request for the inbox than the daemon had had when they looked, after the transport had started: where its first request was in by then, they waited for a second, which an idle transport never makes (its first waits in the daemon), and failed after 2 s. Each test's daemon is new: its first request is the one meant.
* mycelium: tests against a daemon that holds its lock while a poll waitstv11 days1-0/+272
A Mycelium daemon's API as it behaves for the transport, served by axum as Mycelium's is: its node behind one lock, which a request for the inbox holds for as long as it waits for a message, and which every other request waits for, as Mycelium 0.7's long poll does. Messages come into the inbox beside that lock, as from the network. Against it, the transport as it is: an idle node's sends wait behind its own polls of the inbox, which wait for five minutes, so `a_node_with_nothing_coming_in_sends_at_once` and `messages_coming_while_the_node_sends_all_come_in` fail here (each send times out); messages are taken as they come, and an idle node asks its daemon nothing again and again, which the other two tests keep so.