Skip to content

Commit 69af74e

Browse files
authored
Added max age for quant tests (#117)
1 parent 4091c4b commit 69af74e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

tests/common_parameters.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,6 @@
3232
default_dates_frequency = "Monthly"
3333
default_dates_account = "CLIENT:/BISAM/REPOSITORY/QA/SMALL_PORT.ACCT"
3434
default_lookup_directory = "client:"
35+
# This is exclusively created for the quant tests to avoid frequent status calls
36+
quant_max_age = '5' if not os.getenv("QUANT_CUSTOM_MAX_AGE") else os.getenv("QUANT_CUSTOM_MAX_AGE")
3537
spar_account = "client:/aapi/spar3_qa_test_document"

tests/test_quant_calculations_api.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from fds.analyticsapi.engines.model.quant_calculation_meta import QuantCalculationMeta
1414
from common_functions import CommonFunctions
1515
from api_workflow import run_api_workflow_with_assertions
16+
import common_parameters
1617

1718

1819
class TestQuantCalculationsApi(unittest.TestCase):
@@ -98,7 +99,8 @@ def read_calculation_status(test_context):
9899
status_response[0].data.status in ("Queued", "Executing")))
99100

100101
while status_response[1] == 202 and (status_response[0].data.status in ("Queued", "Executing")):
101-
max_age = '5'
102+
max_age = common_parameters.quant_max_age
103+
print('max-age: ' + max_age)
102104
age_value = status_response[2].get("cache-control")
103105
if age_value is not None:
104106
max_age = age_value.replace("max-age=", "")

0 commit comments

Comments
 (0)