History | View | Annotate | Download (17.8 kB)
Test the new streaming daemon classes
Unittests cover AsyncStreamServer and AsyncTerminatedMessageStream withboth tcp and unix sockets.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Merge remote branch 'origin/devel-2.1'
Conflicts: test/ganeti.daemon_unittest.py...
AsyncUDPSocket: fix IgnoreSignals usage and test
This bug was found in the asyncore master patch series, but actuallyapplies to 2.1 for AsyncUDPSocket as well.
reraise exceptions in async tests' error handlers
This makes sure that any unforeseen error raises an exception ratherthen just increasing a counter. It makes unittest debugging a loteasier.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Mainloop: handle SIGINT as well (and terminate)
This is needed if daemons are in the foreground, and get ctrl+c-ed bythe user. Also add unittests to make sure the correct signals terminatethe mainloop.
Signed-off-by: Guido Trotter <ultrotter@google.com>...
TestMainloop: test scheduler priorities as well
By using enterabs we can schedule events at the same time, which willthen be sorted by priority.
Fix race condition in mainloop unittest
Currently, in testDeferredCancel if the self._CancelEvent are enteredmore than 0.3 seconds after the _SendSig have been entered, the testcould fail. This is unlikely but may happen. To avoid it we useenterabs, to use absolute times....
TestMainloop.testReRun
Currently we never do that, but it's nice to know we can restart themainloop, after termination.
Add AsyncUDPSocket tests
Add initial mainloop unittests