Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-82676

gRPC unit tests reuse port, causing conflicts with concurrently running tests

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.2.1, 7.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v7.2
    • Service Arch 2023-11-13, Service Arch 2023-11-27
    • 31

      Most of the gRPC-related unit tests rely on a constant to determine which port to listen to. This can lead to spurious test failures if two tests happen to be running at the same time.

      For example, in this failure, you can see in the logged metadata that connections from transport_test (pid 9264) interfered with the "AllowInvalidClientCertificate" test of grpc_transport_layer_test (pid 3140). Likewise, connections from tranport_layer_test interfered with "MarkKillOnGRPCClientDisconnect" test of transport_test.

      We should update these tests to rely on ephemeral ports to avoid these kinds of collisions.

            Assignee:
            patrick.freed@mongodb.com Patrick Freed
            Reporter:
            patrick.freed@mongodb.com Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: