Skip to content

Conversation

@valerena
Copy link
Contributor

@valerena valerena commented Dec 5, 2025

Fix start-lambda-no-containers test and move the creation of the local Lambda client to a separate function

Which issue(s) does this change fix? / Why is this change necessary?

TestFunctionNameFilteringWarmContainersLazy::test_no_containers_before_invoke_with_lazy test has been failing because it finds one running container even though it shouldn't find any. This happens because another test from the same class does create containers, so then this test finds the containers from that other test. This test-separation should be handled by the variable mode_env_variable, which allows the check to only find the containers from this class. <- yes, from this class. The hash is created once per class, so the containers in all the tests on the same class will share the hash.

How does it address the issue?

Split the tests into different classes, so they have different mode_env_variable values, and the container count works correctly.

What side effects does this change have?

Nothing. More classes.

I also split the creation of the local Lambda client (used to invoke the local server), which was being done inside every class manually. Now it's a unified method that gets called without any parameter, instead of having the build all the parameters from the client every time.

Mandatory Checklist

PRs will only be reviewed after checklist is complete

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Also move the creation of the local Lambda client to a separate function
@valerena valerena requested a review from a team as a code owner December 5, 2025 23:14
@vicheey
Copy link
Contributor

vicheey commented Dec 6, 2025

The test is failing, pending merge of #8491

@valerena valerena added this pull request to the merge queue Dec 15, 2025
Merged via the queue into aws:develop with commit b50b38d Dec 15, 2025
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants