Tests: round robin upstream tests.
This commit is contained in:
8
test/python/upstreams/0/wsgi.py
Normal file
8
test/python/upstreams/0/wsgi.py
Normal file
@@ -0,0 +1,8 @@
|
||||
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 []
|
||||
8
test/python/upstreams/1/wsgi.py
Normal file
8
test/python/upstreams/1/wsgi.py
Normal file
@@ -0,0 +1,8 @@
|
||||
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 []
|
||||
8
test/python/upstreams/2/wsgi.py
Normal file
8
test/python/upstreams/2/wsgi.py
Normal file
@@ -0,0 +1,8 @@
|
||||
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 []
|
||||
Reference in New Issue
Block a user