Tests: added test with rescheduling requests.

This commit is contained in:
Andrei Zeliankou
2020-04-14 03:02:16 +01:00
parent 0bfa09dfa0
commit 3c58a4bfc1

View File

@@ -382,6 +382,38 @@ Connection: close
self.wait_for_record(r'At exit called\.'), 'atexit' self.wait_for_record(r'At exit called\.'), 'atexit'
) )
def test_python_process_switch(self):
self.load('delayed')
self.assertIn(
'success',
self.conf('2', 'applications/delayed/processes'),
'configure 2 processes',
)
self.get(headers={
'Host': 'localhost',
'Content-Length': '0',
'X-Delay': '5',
'Connection': 'close',
}, no_recv=True)
headers_delay_1 = {
'Connection': 'close',
'Host': 'localhost',
'Content-Length': '0',
'X-Delay': '1',
}
self.get(headers=headers_delay_1, no_recv=True)
time.sleep(0.5)
for _ in range(10):
self.get(headers=headers_delay_1, no_recv=True)
self.get(headers=headers_delay_1)
@unittest.skip('not yet') @unittest.skip('not yet')
def test_python_application_start_response_exit(self): def test_python_application_start_response_exit(self):
self.load('start_response_exit') self.load('start_response_exit')