|
@@ -19,6 +19,7 @@ from msgq import SubscriptionManager, MsgQ
|
|
|
import unittest
|
|
|
import os
|
|
|
import socket
|
|
|
+import select # needed only for #3014. can be removed once it's solved
|
|
|
import signal
|
|
|
import sys
|
|
|
import time
|
|
@@ -273,6 +274,8 @@ class MsgQTest(unittest.TestCase):
|
|
|
sock = Sock(1)
|
|
|
return notifications, sock
|
|
|
|
|
|
+ @unittest.skipUnless('POLLIN' in select.__dict__,
|
|
|
+ 'cannot perform tests requiring select.poll')
|
|
|
def test_notifies(self):
|
|
|
"""
|
|
|
Test the message queue sends notifications about connecting,
|
|
@@ -312,6 +315,8 @@ class MsgQTest(unittest.TestCase):
|
|
|
self.__msgq.kill_socket(sock.fileno(), sock)
|
|
|
self.assertEqual([('disconnected', {'client': lname})], notifications)
|
|
|
|
|
|
+ @unittest.skipUnless('POLLIN' in select.__dict__,
|
|
|
+ 'cannot perform tests requiring select.poll')
|
|
|
def test_notifies_implicit_kill(self):
|
|
|
"""
|
|
|
Test that the unsubscription notifications are sent before the socket
|