Skip to content

Commit

Permalink
add test endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
linglp committed Feb 2, 2024
1 parent cb7bfab commit 5a7ea8e
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 7 deletions.
44 changes: 39 additions & 5 deletions schematic_api/api/openapi/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1255,8 +1255,8 @@ paths:

/test_time_out:
get:
summary: Test time out 1
description: Test time out 1
summary: sleep 59.9s
description: sleep 59.9s
operationId: schematic_api.api.routes.test_time_out
responses:
"200":
Expand All @@ -1272,8 +1272,8 @@ paths:

/test_time_out_two:
get:
summary: Test time out 2
description: Test time out 2
summary: sleep 60s
description: sleep 60s
operationId: schematic_api.api.routes.test_time_out_two
responses:
"200":
Expand All @@ -1285,4 +1285,38 @@ paths:
"500":
description: Test
tags:
- Test
- Test

/test_time_out_three:
get:
summary: sleep 120s
description: sleep 120s
operationId: schematic_api.api.routes.test_time_out_three
responses:
"200":
description: Test
content:
text/plain:
schema:
type: string
"500":
description: Test
tags:
- Test

/test_time_out_four:
get:
summary: sleep 180s
description: sleep 180s
operationId: schematic_api.api.routes.test_time_out_four
responses:
"200":
description: Test
content:
text/plain:
schema:
type: string
"500":
description: Test
tags:
- Test
16 changes: 14 additions & 2 deletions schematic_api/api/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1018,11 +1018,23 @@ def get_schematic_version() -> str:
def test_time_out():
"""return test time out
"""
time.sleep(60)
time.sleep(59.9)
return "okay"

def test_time_out_two():
"""return test time out
"""
time.sleep(59.9)
time.sleep(60)
return "okay"

def test_time_out_three():
"""return test time out
"""
time.sleep(120)
return "okay"

def test_time_out_four():
"""return test time out
"""
time.sleep(180)
return "okay"

0 comments on commit 5a7ea8e

Please sign in to comment.