Commit 95ab227e authored by Guido Trotter's avatar Guido Trotter
Browse files

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
  this caused me trouble now that I learned to look at coverage
Signed-off-by: default avatarGuido Trotter <>
Reviewed-by: default avatarIustin Pop <>
parent e9de7da4
......@@ -186,12 +186,6 @@ class TestAsyncUDPSocket(testutils.GanetiTestCase):
def testNoDoubleBind(self):
self.assertRaises(socket.error, self.client.bind, ("", self.port))
def _ThreadedClient(self, payload):
self.client.enqueue_send("", self.port, payload)
print "sending %s" % payload
while self.client.writable():
def testAsyncClientServer(self):
self.client.enqueue_send("", self.port, "p1")
self.client.enqueue_send("", self.port, "p2")
......@@ -200,6 +194,7 @@ class TestAsyncUDPSocket(testutils.GanetiTestCase):
self.assertEquals(self.server.received, ["p1", "p2", "terminate"])
def testSyncClientServer(self):
self.client.enqueue_send("", self.port, "p1")
self.client.enqueue_send("", self.port, "p2")
while self.client.writable():
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment