tests: Fix flakey behavior of ctdb_fetch test
There were two issues with this test:
1. Since the messages are sent from one node to the next, if a node
does not register for messages before CTDB on that nodes receives
the message, it will never be seen by ctdb_fetch and it would
block on receive and would not send any messages to next node.
The crude solution is to sleep just before the messages are sent,
so that ctdb_fetch on all nodes have registered for the messages.
2. If ctdb_fetch stops sending messages after timelimit expiry, the
next node will keep waiting to receive messages in event_loop_once().
The default timeout is 30 seconds for event_loop_once(). Adding a
timed event will always set the timeout value to the time remaining
for the timed event to expire.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit
bc55e09fdac9f743d6428bfe0be77840ad0fd1ba)