@@ -0,0 +1,1480 @@
+import os%0Aimport time%0A%0Afrom msl.examples.loadlib import EXAMPLES_DIR%0Afrom msl.loadlib import (%0A    Server32,%0A    Client64,%0A    IS_MAC,%0A    IS_PYTHON_64BIT,%0A)%0A%0A# When the 32-bit Server imports this module on Windows & Python 3.8%0A# the following exception is raised due to pytest being imported%0A#    ImportError: No module named 'importlib_metadata'%0A# The 32-bit server does not require pytest to be imported%0Aif IS_PYTHON_64BIT:%0A    import pytest%0Aelse:%0A    class Mark(object):%0A        @staticmethod%0A        def skipif(condition, reason=None):%0A            def func(function):%0A                return function%0A            return func%0A%0A    class pytest(object):%0A        mark = Mark%0A%0A%0Aclass ShutdownHangs(Server32):%0A%0A    def __init__(self, host, port, path=None):%0A        p = os.path.join(path, 'cpp_lib32')%0A        super(ShutdownHangs, self).__init__(p, 'cdll', host, port)%0A%0A    def add(self, x, y):%0A        return self.lib.add(x, y)%0A%0A    def shutdown_handler(self):%0A        time.sleep(999)%0A%0A%0A@pytest.mark.skipif(IS_MAC, reason='the 32-bit server for macOS does not exist')%0Adef test_killed():%0A%0A    class Hangs(Client64):%0A%0A        def __init__(self):%0A            super(Hangs, self).__init__(__file__, path=EXAMPLES_DIR)%0A%0A        def add(self, x, y):%0A            return self.request32('add', x, y)%0A%0A    hangs = Hangs()%0A    assert hangs.add(1, 1) == 2%0A    with pytest.warns(UserWarning, match=r'killed the 32-bit server using brute force'):%0A        hangs.shutdown_server32(kill_timeout=2)%0A

create test_server32_shutdown::test_killed