summaryrefslogtreecommitdiffhomepage
path: root/test/test_python_application.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test/test_python_application.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test_python_application.py b/test/test_python_application.py
index 8632621c..ec59c741 100644
--- a/test/test_python_application.py
+++ b/test/test_python_application.py
@@ -507,6 +507,19 @@ Connection: close
self.assertEqual(self.get()['body'], '0123456789', 'write')
+ def test_python_application_threading(self):
+ """wait_for_record() timeouts after 5s while every thread works at
+ least 3s. So without releasing GIL test should fail.
+ """
+
+ self.load('threading')
+
+ for _ in range(10):
+ self.get(no_recv=True)
+
+ self.assertIsNotNone(
+ self.wait_for_record(r'\(5\) Thread: 100'), 'last thread finished'
+ )
if __name__ == '__main__':
TestPythonApplication.main()