Skip to content

Fix Docker Test Container Connection Failure#852

Open
ahmedmuhsin wants to merge 12 commits intoAzure:devfrom
ahmedmuhsin:fix-docker-test-failures
Open

Fix Docker Test Container Connection Failure#852
ahmedmuhsin wants to merge 12 commits intoAzure:devfrom
ahmedmuhsin:fix-docker-test-failures

Conversation

@ahmedmuhsin
Copy link
Contributor

@ahmedmuhsin ahmedmuhsin commented Jan 12, 2026

This pull request enhances the Azure Functions test kit by improving test reliability and debugging capabilities. The main updates include adding automatic retries for flaky tests, displaying container logs upon test failures, and updating dependencies for better compatibility.

Test Reliability Improvements:

  • Added support for automatic test retries using the pytest-rerunfailures plugin. Retry counts and delay can be configured via environment variables (FUNCTIONS_TEST_MAX_RERUNS, FUNCTIONS_TEST_RERUNS_DELAY). This helps reduce the impact of flaky tests.
  • Updated the test runner command in the CI pipeline to use longer tracebacks (--tb=long) for improved failure diagnostics.

Debugging Enhancements:

  • Implemented a pytest hook to capture and display container logs when a test fails, making it easier to diagnose issues in the Dockerized test environment.

Dependency Updates:

  • Updated azure-storage-blob to version 12.27.1 and added pytest-rerunfailures as a dependency to support the new retry functionality.

Codebase Maintenance:

  • Added the pytest import to the plugin and improved docstrings to reflect the new functionality.

@ahmedmuhsin ahmedmuhsin force-pushed the fix-docker-test-failures branch from effef17 to ae3dfdd Compare January 13, 2026 19:51
@ahmedmuhsin ahmedmuhsin marked this pull request as ready for review February 6, 2026 22:55

# Configure automatic retries for flaky tests
# Read retry settings from environment variables
max_reruns = int(os.getenv('FUNCTIONS_TEST_MAX_RERUNS', '2'))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants