diff --git a/tests/common_parameters.py b/tests/common_parameters.py index 492a572..954503f 100644 --- a/tests/common_parameters.py +++ b/tests/common_parameters.py @@ -32,4 +32,6 @@ default_dates_frequency = "Monthly" default_dates_account = "CLIENT:/BISAM/REPOSITORY/QA/SMALL_PORT.ACCT" default_lookup_directory = "client:" +# This is exclusively created for the quant tests to avoid frequent status calls +quant_max_age = '5' if not os.getenv("QUANT_CUSTOM_MAX_AGE") else os.getenv("QUANT_CUSTOM_MAX_AGE") spar_account = "client:/aapi/spar3_qa_test_document" diff --git a/tests/test_quant_calculations_api.py b/tests/test_quant_calculations_api.py index 2350d50..19848f87 100644 --- a/tests/test_quant_calculations_api.py +++ b/tests/test_quant_calculations_api.py @@ -13,6 +13,7 @@ from fds.analyticsapi.engines.model.quant_calculation_meta import QuantCalculationMeta from common_functions import CommonFunctions from api_workflow import run_api_workflow_with_assertions +import common_parameters class TestQuantCalculationsApi(unittest.TestCase): @@ -98,7 +99,8 @@ def read_calculation_status(test_context): status_response[0].data.status in ("Queued", "Executing"))) while status_response[1] == 202 and (status_response[0].data.status in ("Queued", "Executing")): - max_age = '5' + max_age = common_parameters.quant_max_age + print('max-age: ' + max_age) age_value = status_response[2].get("cache-control") if age_value is not None: max_age = age_value.replace("max-age=", "")