-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Fixes cache issue in web-server services i/o model (#6176)
- Loading branch information
Showing
6 changed files
with
70 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
# pylint: disable=unused-argument | ||
# pylint: disable=unused-variable | ||
|
||
import asyncio | ||
import json | ||
from copy import deepcopy | ||
|
||
|
@@ -69,14 +70,16 @@ def test_from_catalog_to_webapi_service( | |
"owner": "[email protected]", | ||
} | ||
|
||
def _run(): | ||
def _run_async_test(): | ||
s = deepcopy(catalog_service) | ||
replace_service_input_outputs( | ||
s, unit_registry=unit_registry, **RESPONSE_MODEL_POLICY | ||
asyncio.get_event_loop().run_until_complete( | ||
replace_service_input_outputs( | ||
s, unit_registry=unit_registry, **RESPONSE_MODEL_POLICY | ||
) | ||
) | ||
return s | ||
|
||
result = benchmark(_run) | ||
result = benchmark(_run_async_test) | ||
|
||
# check result | ||
got = json.dumps(result, indent=1) | ||
|