Skip to content

Fix: Skiping test on RHEL and MacOS (known failure)#1597

Open
jahnvi480 wants to merge 8 commits intodevfrom
jahnvi/failing_tests_on_ci
Open

Fix: Skiping test on RHEL and MacOS (known failure)#1597
jahnvi480 wants to merge 8 commits intodevfrom
jahnvi/failing_tests_on_ci

Conversation

@jahnvi480
Copy link
Copy Markdown
Contributor

@jahnvi480 jahnvi480 commented Apr 6, 2026

This pull request updates two test files to improve compatibility with different operating systems by skipping tests that are not supported on macOS and RHEL. The main changes add checks to prevent running mock TDS server TLS handshake tests on these platforms.

Problem
The mock TDS access token tests use a Python mock TDS server with a self-signed certificate to verify that access token–based connections are correctly differentiated in the ODBC connection pool. These tests fail silently on macOS and RHEL - the worker subprocess produces no output and no error diagnostics, causing the test to hang or return empty results.

The root cause is the TLS handshake between the ODBC driver and the mock server's self-signed certificate. Both macOS and RHEL enforce stricter TLS/crypto policies than Ubuntu:

macOS: Uses Secure Transport / LibreSSL, which may reject the mock server's self-signed cert or cipher negotiation
RHEL 9/10: Ships with FIPS-compatible crypto policies (DEFAULT or FUTURE) that restrict key sizes, signature algorithms, and TLS versions, causing the ODBC driver to fail during the handshake before any PHP code executes
Multiple attempts to capture diagnostics (stderr logging, proc_open with timeouts, extension-load checks) confirmed the failure occurs at the ODBC/TLS layer, below what PHP can observe.

Test compatibility improvements:

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.74%. Comparing base (204c4de) to head (b5c9d72).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##              dev    #1597   +/-   ##
=======================================
  Coverage   85.74%   85.74%           
=======================================
  Files          23       23           
  Lines        7221     7221           
=======================================
  Hits         6192     6192           
  Misses       1029     1029           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- Worker: check extension_loaded('sqlsrv') early with stdout diagnostics
- Worker: add LoginTimeout=10 to prevent indefinite TLS hangs
- Helper: capture stderr to file instead of discarding it
- Test: dump worker stderr, server log, and command on empty output
- Clean: remove stale stderr temp files
Reverts the stderr capture, proc_open timeout, extension check, and
LoginTimeout additions from ec2f39c. These diagnostics did not produce
output on RHEL or macOS. Will skip the tests on those platforms instead.
The mock TDS server TLS handshake fails silently on macOS and RHEL
(likely due to stricter crypto policies), causing the tests to hang
with no diagnostic output. Skip on these platforms; tests still run
on Ubuntu and Windows.
Remove the -n flag additions in azure-pipelines.yml and the extension
forwarding logic in mock_tds_helper.inc. These changes are not needed
now that the mock TDS tests are skipped on macOS and RHEL.
@jahnvi480 jahnvi480 changed the title Fix: Modified build_worker_command to forward the PHP INI configuration to the worker subprocess Fix: Skiping test on RHEL and MacOS (known failure) Apr 13, 2026
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.

1 participant