Skip to content

[5.1] Flaky Test: TransientFault_IgnoreServerProvidedFailoverPartner_ShouldConnectToUserProvidedPartner #3855

Open

Description

@paulmedynski

We're seeing intermittent failures in the TransientFault_IgnoreServerProvidedFailoverPartner_ShouldConnectToUserProvidedPartner test:

  TDSServerEndPoint TransientFault_IgnoreServerProvidedFailoverPartner_ShouldConnectToUserProvidedPartner 0.0.0.0:41395 Is Server Socket Bound: True Testing connectivity to the endpoint created for the server.
  TDSServerEndPoint TransientFault_IgnoreServerProvidedFailoverPartner_ShouldConnectToUserProvidedPartner 0.0.0.0:41395 Endpoint test successful.
  TDSServerEndPoint TransientFault_IgnoreServerProvidedFailoverPartner_ShouldConnectToUserProvidedPartner 0.0.0.0:41395 Listener Thread Started 
  TDSServerEndPoint TransientFault_IgnoreServerProvidedFailoverPartner_ShouldConnectToUserProvidedPartner 0.0.0.0:41395 Connection closed but NOT removed (not found): 127.0.0.1:53526
  TDSServerEndPoint TransientFault_IgnoreServerProvidedFailoverPartner_ShouldConnectToUserProvidedPartner 0.0.0.0:41395 New connection accepted: 127.0.0.1:53526 Total connections: 1 
  TDSServerEndPoint TransientFault_IgnoreServerProvidedFailoverPartner_ShouldConnectToUserProvidedPartner 0.0.0.0:40853 Is Server Socket Bound: True Testing connectivity to the endpoint created for the server.
  TDSServerEndPoint TransientFault_IgnoreServerProvidedFailoverPartner_ShouldConnectToUserProvidedPartner 0.0.0.0:40853 Endpoint test successful.
  TDSServerEndPoint TransientFault_IgnoreServerProvidedFailoverPartner_ShouldConnectToUserProvidedPartner 0.0.0.0:40853 Listener Thread Started 
  TDSServerEndPoint TransientFault_IgnoreServerProvidedFailoverPartner_ShouldConnectToUserProvidedPartner 0.0.0.0:40853 Connection closed but NOT removed (not found): 127.0.0.1:45696
  TDSServerEndPoint TransientFault_IgnoreServerProvidedFailoverPartner_ShouldConnectToUserProvidedPartner 0.0.0.0:40853 New connection accepted: 127.0.0.1:45696 Total connections: 1 
  TDSServerEndPoint TransientFault_IgnoreServerProvidedFailoverPartner_ShouldConnectToUserProvidedPartner 0.0.0.0:40853 New connection accepted: 127.0.0.1:45702 Total connections: 2 
  TDSServerEndPoint TransientFault_IgnoreServerProvidedFailoverPartner_ShouldConnectToUserProvidedPartner 0.0.0.0:40853 Connection closed and removed: 127.0.0.1:45702
  TDSServerEndPoint TransientFault_IgnoreServerProvidedFailoverPartner_ShouldConnectToUserProvidedPartner 0.0.0.0:41395 New connection accepted: 127.0.0.1:53538 Total connections: 2 
  TDSServerEndPoint TransientFault_IgnoreServerProvidedFailoverPartner_ShouldConnectToUserProvidedPartner 0.0.0.0:41395 New connection accepted: 127.0.0.1:53540 Total connections: 3 
  TDSServerEndPoint TransientFault_IgnoreServerProvidedFailoverPartner_ShouldConnectToUserProvidedPartner 0.0.0.0:41395 Connection closed and removed: 127.0.0.1:53540
  TDSServerEndPoint TransientFault_IgnoreServerProvidedFailoverPartner_ShouldConnectToUserProvidedPartner 0.0.0.0:41395 Connection closed and removed: 127.0.0.1:53538
  [xUnit.net 00:00:04.44]     Microsoft.Data.SqlClient.Tests.SqlConnectionBasicTests.TransientFault_IgnoreServerProvidedFailoverPartner_ShouldConnectToUserProvidedPartner [FAIL]
  [xUnit.net 00:00:04.44]       Assert.Equal() Failure: Values differ
  [xUnit.net 00:00:04.44]       Expected: 1
  [xUnit.net 00:00:04.44]       Actual:   2
  [xUnit.net 00:00:04.44]       Stack Trace:
  [xUnit.net 00:00:04.45]         /_/src/Microsoft.Data.SqlClient/tests/FunctionalTests/SqlConnectionBasicTests.cs(286,0): at Microsoft.Data.SqlClient.Tests.SqlConnectionBasicTests.TransientFault_IgnoreServerProvidedFailoverPartner_ShouldConnectToUserProvidedPartner()

I recently added the enhanced TDSServerEndPoint logging that shows the client connections coming and going. Hopefully that helps track down the issue.

In the above logs, we see 2 listener sockets accepting clients (ports 41395 and 40853). I'm not sure if we're expecting 2 listeners.

Here is an example CI run:

https://sqlclientdrivers.visualstudio.com/public/_build/results?buildId=133820&view=logs&j=6dc9fece-c22c-5b30-f35a-8f587584b6fc&t=8f3e5450-4b8e-572e-2076-19a4ce40a073

The failures seem to only occur on Linux.

Activity

  1. added
    Area\Tests
    on Dec 18, 2025
  2. moved this from To triage to Backlog in SqlClient Boardon Dec 18, 2025
  3. cheenamalhotra commented on Dec 18, 2025

    @cheenamalhotra
    Member
  4. priyankatiwari08 commented on Sep 17, 2026

    @priyankatiwari08
    Contributor

    /triage

  5. github-actions commented on Sep 17, 2026

    @github-actions

    Generated by SqlClient Issue Auto-Triage for #3855 · copilot · auto · 90 AIC · ⌖ 13.2 AIC · ⊞ 11.9K · ◷

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area\Tests

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions