Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tests/common_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@
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")
4 changes: 3 additions & 1 deletion tests/test_quant_calculations_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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=", "")
Expand Down
Loading