Change sleep time
This commit is contained in:
parent
0bd61f6a57
commit
d8e480ab48
|
@ -8,7 +8,7 @@ Config.REQUEST_TIMEOUT = 1
|
|||
app = Sanic(__name__)
|
||||
|
||||
|
||||
@app.route("/")
|
||||
@app.route('/')
|
||||
async def test(request):
|
||||
await asyncio.sleep(3)
|
||||
return text('Hello, world!')
|
||||
|
@ -18,4 +18,4 @@ async def test(request):
|
|||
def timeout(request, exception):
|
||||
return text('RequestTimeout from error_handler.')
|
||||
|
||||
app.run(host="0.0.0.0", port=8000)
|
||||
app.run(host='0.0.0.0', port=8000)
|
||||
|
|
|
@ -12,7 +12,7 @@ request_timeout_default_app = Sanic('test_request_timeout_default')
|
|||
|
||||
@request_timeout_app.route('/1')
|
||||
async def handler_1(request):
|
||||
await asyncio.sleep(2)
|
||||
await asyncio.sleep(1)
|
||||
return text('OK')
|
||||
|
||||
|
||||
|
@ -29,7 +29,7 @@ def test_server_error_request_timeout():
|
|||
|
||||
@request_timeout_default_app.route('/1')
|
||||
async def handler_2(request):
|
||||
await asyncio.sleep(2)
|
||||
await asyncio.sleep(1)
|
||||
return text('OK')
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user