Update test_tinydb_manager_for_parallel_requests.py (#1720)
* Update test_tinydb_manager_for_parallel_requests.py Updated the call to execute_process and now checks the expected number of process results are present. * Update test_tinydb_manager_for_parallel_requests.py --------- Co-authored-by: FrancescoIngv <FrancescoIngv@users.noreply.github.com> Co-authored-by: Tom Kralidis <tomkralidis@gmail.com>
This commit is contained in:
@@ -39,6 +39,7 @@ from werkzeug.wrappers import Request
|
||||
from werkzeug.test import create_environ
|
||||
|
||||
from pygeoapi.api import API, APIRequest
|
||||
import pygeoapi.api.processes as processes_api
|
||||
from pygeoapi.util import yaml_load
|
||||
from .util import get_test_file_path
|
||||
|
||||
@@ -61,7 +62,8 @@ def api_(config, openapi):
|
||||
|
||||
|
||||
def _execute_process(api, request, process_id, index, processes_out):
|
||||
headers, http_status, response = api.execute_process(request, process_id)
|
||||
headers, http_status, response = processes_api.execute_process(
|
||||
api, request, process_id)
|
||||
processes_out[index] = {"headers": headers, "http_status": http_status,
|
||||
"response": response}
|
||||
|
||||
@@ -112,6 +114,7 @@ def test_async_hello_world_process_parallel(api_, config):
|
||||
# Test if jobs are registered and run correctly
|
||||
db = TinyDB(index_name)
|
||||
query = Query()
|
||||
assert len(processes_out.values()) == NUM_PROCS
|
||||
for process_out in processes_out.values():
|
||||
try:
|
||||
assert process_out['http_status'] == 200
|
||||
|
||||
Reference in New Issue
Block a user