Commit e8e4cd32 authored by Jelte Jansen's avatar Jelte Jansen

remove the TEST_SOCKET_FILE at the end of the test that makes it (just a bit...

remove the TEST_SOCKET_FILE at the end of the test that makes it (just a bit of cleanup, no ticket, reviewed by shane)


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@2828 e5f2f494-b856-4b98-b285-d166d9295462
parent 9d3093ec
......@@ -344,17 +344,21 @@ class testSession(unittest.TestCase):
if os.path.exists(TEST_SOCKET_FILE):
os.remove(TEST_SOCKET_FILE)
s1.bind(TEST_SOCKET_FILE)
s1.listen(1)
s2 = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
s2.connect(TEST_SOCKET_FILE)
sess = MySession(1, s2)
# set timeout to 100 msec, so test does not take too long
sess.set_timeout(100)
env, msg = sess.group_recvmsg(False)
self.assertEqual(None, env)
self.assertEqual(None, msg)
try:
s1.listen(1)
s2 = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
s2.connect(TEST_SOCKET_FILE)
sess = MySession(1, s2)
# set timeout to 100 msec, so test does not take too long
sess.set_timeout(100)
env, msg = sess.group_recvmsg(False)
self.assertEqual(None, env)
self.assertEqual(None, msg)
finally:
os.remove(TEST_SOCKET_FILE)
if __name__ == "__main__":
unittest.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