Statistics
| Branch: | Tag: | Revision:

root / test / ganeti.daemon_unittest.py @ 8620f50e

History | View | Annotate | Download (24 kB)

# Date Author Comment
d8bcfe21 07/12/2010 03:58 pm Manuel Franceschini

Confd IPv6 support

This patch series basically adds a new parameter 'family' to the constructors
of daemon.AsyncUDPSocket and confd.client.ConfdUDPClient. This enables the
users of these two classes to support IPv6.

In ganeti-confd.ConfdAsyncUDPClient a method to check the address families of...

1e063ccd 06/29/2010 02:30 pm Guido Trotter

AsyncTerminatedMessageStream: send_message

This function adds the ability for a AsyncTerminatedMessageStream to
have a thread-safe message delivery function.

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

37e62cb9 06/29/2010 02:30 pm Guido Trotter

AsyncTerminatedMessageStream: limit message count

Currently the message stream can process any number of messages in
parallel (if they get dispatched to different threads or processes).
In order to limit their number we only handle messages and read from...

0fb44e89 06/03/2010 03:43 pm Guido Trotter

Merge branch 'devel-2.1'

  • devel-2.1:
    TestAsyncUDPSocket: remove dead code and add test
    TestAsyncUDPSocket: test for oversized sends
    Document the check-man change
    Update NEWS for Ganeti 2.1.3
    Second attempt at fixing check-man
    Fix check-man for newer man-db...
495ba852 06/03/2010 01:48 pm Guido Trotter

daemon.AsyncAwaker

This new asyncore dispatcher can be used to force a thread running the
asyncore loop to awake from the select, by signaling it on one of its
selected sockets.

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

18215385 06/03/2010 01:48 pm Guido Trotter

Test the new streaming daemon classes

Unittests cover AsyncStreamServer and AsyncTerminatedMessageStream with
both tcp and unix sockets.

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

95ab227e 06/02/2010 08:55 pm Guido Trotter

TestAsyncUDPSocket: remove dead code and add test

- _ThreadedClient was added on the idea of making this unittest
concurrent, which was actually never done (we could test everything
without it, so well)
- handle_write() was never called without filling the send queue, and...

e9de7da4 06/02/2010 08:54 pm Guido Trotter

TestAsyncUDPSocket: test for oversized sends

Signed-off-by: Guido Trotter <>
Reviewed-by: Luca Bigliardi <>

ff18f526 06/01/2010 08:31 pm Guido Trotter

Merge remote branch 'origin/devel-2.1'

  • origin/devel-2.1:
    Explicitely return None from IgnoreSignals
    AsyncUDPSocket: fix IgnoreSignals usage and test
    Add KVM chroot feature
    Fix and Improve TryToRoman unittest

Conflicts:
test/ganeti.daemon_unittest.py...

6e7e58b4 06/01/2010 08:22 pm Guido Trotter

AsyncUDPSocket: fix IgnoreSignals usage and test

This bug was found in the asyncore master patch series, but actually
applies to 2.1 for AsyncUDPSocket as well.

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

e3cc4c69 06/01/2010 11:34 am Guido Trotter

reraise exceptions in async tests' error handlers

This makes sure that any unforeseen error raises an exception rather
then just increasing a counter. It makes unittest debugging a lot
easier.

Signed-off-by: Guido Trotter <>
Reviewed-by: Iustin Pop <>

f59dce3e 05/22/2010 09:58 am Guido Trotter

Mainloop: handle SIGINT as well (and terminate)

This is needed if daemons are in the foreground, and get ctrl+c-ed by
the user. Also add unittests to make sure the correct signals terminate
the mainloop.

Signed-off-by: Guido Trotter <>...

85dbfd78 05/20/2010 05:53 pm Guido Trotter

TestMainloop: test scheduler priorities as well

By using enterabs we can schedule events at the same time, which will
then be sorted by priority.

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

19ad29d2 05/20/2010 05:52 pm Guido Trotter

Fix race condition in mainloop unittest

Currently, in testDeferredCancel if the self._CancelEvent are entered
more than 0.3 seconds after the _SendSig have been entered, the test
could fail. This is unlikely but may happen. To avoid it we use
enterabs, to use absolute times....

c6987b16 05/20/2010 05:52 pm Guido Trotter

TestMainloop.testReRun

Currently we never do that, but it's nice to know we can restart the
mainloop, after termination.

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

4db33137 05/20/2010 05:52 pm Guido Trotter

Add AsyncUDPSocket tests

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

1118ec44 05/20/2010 05:52 pm Guido Trotter

Add initial mainloop unittests

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>