Parcourir la source

Check it blocks forever even with timeout

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac349@3113 e5f2f494-b856-4b98-b285-d166d9295462
Michal Vaner il y a 14 ans
Parent
commit
eb2962f790
1 fichiers modifiés avec 8 ajouts et 0 suppressions
  1. 8 0
      src/lib/python/isc/config/tests/ccsession_test.py

+ 8 - 0
src/lib/python/isc/config/tests/ccsession_test.py

@@ -389,6 +389,14 @@ class TestModuleCCSession(unittest.TestCase):
         mccs.set_command_handler(self.my_command_handler_ok)
         self.assertRaises(WouldBlockForever, lambda: mccs.check_command(False))
 
+    def test_check_command_blocks_forever_timeout(self):
+        """Like above, but it should wait forever even with timeout here."""
+        fake_session = FakeModuleCCSession()
+        fake_session.set_timeout(1)
+        mccs = self.create_session("spec2.spec", None, None, fake_session)
+        mccs.set_command_handler(self.my_command_handler_ok)
+        self.assertRaises(WouldBlockForever, lambda: mccs.check_command(False))
+
     def test_remote_module(self):
         fake_session = FakeModuleCCSession()
         mccs = self.create_session("spec1.spec", None, None, fake_session)