Tests: use "return" action in upstream tests.

This commit is contained in:
Andrei Zeliankou
2020-04-03 01:49:18 +01:00
parent d7aa514d6a
commit a49023229e
5 changed files with 101 additions and 98 deletions

View File

@@ -11,6 +11,7 @@ def application(environ, start_response):
write = start_response('200', [('Content-Length', str(len(body)))])
if not body:
time.sleep(delay)
return []
step = int(len(body) / parts)

View File

@@ -1,8 +0,0 @@
import time
def application(env, start_response):
delay = int(env.get('HTTP_X_DELAY', 0))
start_response('200', [('Content-Length', '0'), ('X-Upstream', '0')])
time.sleep(delay)
return []

View File

@@ -1,8 +0,0 @@
import time
def application(env, start_response):
delay = int(env.get('HTTP_X_DELAY', 0))
start_response('200', [('Content-Length', '0'), ('X-Upstream', '1')])
time.sleep(delay)
return []

View File

@@ -1,8 +0,0 @@
import time
def application(env, start_response):
delay = int(env.get('HTTP_X_DELAY', 0))
start_response('200', [('Content-Length', '0'), ('X-Upstream', '2')])
time.sleep(delay)
return []