- testcode_path = os.path.join(
- os.path.dirname(os.path.abspath(__file__)),
- 'wsgi_test_conntimeout.py')
- output = tests.run_python(testcode_path)
- sections = output.split(b"SEPERATOR_SENTINEL")
- # first section is empty
- self.assertEqual(3, len(sections), output)
- # if the "BOOM" check fails, it's because our timeout didn't happen
- # (if eventlet stops using file.readline() to read HTTP headers,
- # for instance)
- for runlog in sections[1:]:
- debug = False if "debug set to: False" in runlog else True
- if debug:
- self.assertTrue("timed out" in runlog)
- self.assertTrue("BOOM" in runlog)
- self.assertFalse("Traceback" in runlog)