Skip to content

Test-Connection test setup fails on macOS due to DNS issue #12935

@rjmholt

Description

@rjmholt

From the test output:

  Describing Test-Connection
    [-] Error occurred in Describe block 0ms
      ExtendedSocketException: nodename nor servname provided, or not known
      MethodInvocationException: Exception calling "GetHostEntry" with "1" argument(s): "nodename nor servname provided, or not known"
      at <ScriptBlock>, /Users/runner/runners/2.170.1/work/1/s/test/powershell/Modules/Microsoft.PowerShell.Management/Test-Connection.Tests.ps1: line 15
      at Invoke-Blocks, /Users/runner/runners/2.170.1/work/1/a/bins/publish/Modules/Pester/4.10.1/Functions/SetupTeardown.ps1: line 135
      at Invoke-TestGroupSetupBlocks, /Users/runner/runners/2.170.1/work/1/a/bins/publish/Modules/Pester/4.10.1/Functions/SetupTeardown.ps1: line 121
      at DescribeImpl, /Users/runner/runners/2.170.1/work/1/a/bins/publish/Modules/Pester/4.10.1/Functions/Describe.ps1: line 209

Based on dotnet/runtime#29780 (comment), this seems to be a DNS resolution issue, and seems to be common on macOS.

I don't know enough about these tests or networking configuration to be a good judge of whether we should try to fix this or how, but want to discuss here if possible.

In particular:

  • Is this something we think we could fix or workaround in our code? The Test-Connection tests on macOS seem to have been flaky for some time.
  • Do we think there's some way we could improve the way the CI instance is configured to mitigate?
  • Otherwise, is there some other way we could perform test setup here that wouldn't hit this issue? Or possibly we could identify when we've hit this issue and handle it somehow?

/cc @JamesWTruher @SteveL-MSFT @iSazonov

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-Maintainers-Buildspecific to affecting the buildIssue-BugIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.WG-Quality-Testissues in a test or in test infrastructure

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions