Commit e9de7da4 authored by Guido Trotter's avatar Guido Trotter
Browse files

TestAsyncUDPSocket: test for oversized sends

Signed-off-by: default avatarGuido Trotter <>
Reviewed-by: default avatarLuca Bigliardi <>
parent 1de45c78
......@@ -28,7 +28,9 @@ import socket
import time
from ganeti import daemon
from ganeti import constants
from ganeti import utils
from ganeti import errors
import testutils
......@@ -235,6 +237,11 @@ class TestAsyncUDPSocket(testutils.GanetiTestCase):
self.assertEquals(self.server.received, ["p1", "p2", "terminate"])
def testOversizedDatagram(self):
oversized_data = (constants.MAX_UDP_DATA_SIZE + 1) * "a"
self.assertRaises(errors.UdpDataSizeError, self.client.enqueue_send,
"", self.port, oversized_data)
if __name__ == "__main__":
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