Skip to content

Commit

Permalink
Fix test for memory issues on Windows GH Actions
Browse files Browse the repository at this point in the history
GitHub Actions was consistently failing on Windows instances with this
test. Likely cause was loading the large model files into memory, which
persisted until testing was completed. Since the rest of the model is
not needed, only return the service name and ID.
  • Loading branch information
kdaily committed Jul 5, 2023
1 parent 9ba6fdd commit e55ca6a
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def _known_service_names_and_models():
result = []
for service_name in available_services:
model = my_session.get_service_model(service_name)
result.append((model.service_name, model))
result.append((model.service_name, model.service_id))
return sorted(result)


Expand All @@ -192,12 +192,12 @@ def test_resolve_configured_endpoint_url(test_case, client_creator):


@pytest.mark.parametrize(
'service_name,service_model', _known_service_names_and_models()
'service_name,service_id', _known_service_names_and_models()
)
def test_expected_service_env_var_name_is_respected(
service_name, service_model, client_creator
service_name, service_id, client_creator
):
transformed_service_id = service_model.service_id.replace(' ', '_').upper()
transformed_service_id = service_id.replace(' ', '_').upper()

client = client_creator(
service=service_name,
Expand All @@ -220,12 +220,12 @@ def test_expected_service_env_var_name_is_respected(


@pytest.mark.parametrize(
'service_name,service_model', _known_service_names_and_models()
'service_name,service_id', _known_service_names_and_models()
)
def test_expected_service_config_section_name_is_respected(
service_name, service_model, client_creator
service_name, service_id, client_creator
):
transformed_service_id = service_model.service_id.replace(' ', '_').lower()
transformed_service_id = service_id.replace(' ', '_').lower()

client = client_creator(
service=service_name,
Expand Down

0 comments on commit e55ca6a

Please sign in to comment.