Skip to content

Speed up tests targeting invalid servers#1622

Draft
David-Engel wants to merge 2 commits into
devfrom
david/testoptimization
Draft

Speed up tests targeting invalid servers#1622
David-Engel wants to merge 2 commits into
devfrom
david/testoptimization

Conversation

@David-Engel
Copy link
Copy Markdown
Collaborator

Low hanging fruit to save a little time on test runs.

This pull request updates several functional tests for both pdo_sqlsrv and sqlsrv drivers to ensure that connection attempts to invalid servers fail quickly. The main change is the addition of a LoginTimeout = 1 parameter to connection strings and options, which reduces the time spent waiting for a connection to fail when testing error handling. This will make the test suite run faster and more reliably when simulating failed connections.

Test reliability and speed improvements:

  • Added LoginTimeout = 1 to DSNs and connection options in multiple pdo_sqlsrv test files to ensure invalid server connection attempts fail quickly. [1] [2] [3] [4]
  • Updated sqlsrv_connect calls in several sqlsrv test files to include 'LoginTimeout' => 1 in the connection options for invalid server scenarios. [1] [2] [3] [4] [5]

@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.72%. Comparing base (f17b007) to head (e5fbee3).

Additional details and impacted files

Impacted file tree graph

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

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