[SERVER-82676] gRPC unit tests reuse port, causing conflicts with concurrently running tests Created: 01/Nov/23  Updated: 05/Jan/24  Resolved: 13/Nov/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.2.1, 7.3.0-rc0

Type: Bug Priority: Major - P3
Reporter: Patrick Freed Assignee: Patrick Freed
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.2
Sprint: Service Arch 2023-11-13, Service Arch 2023-11-27
Participants:
Linked BF Score: 31

 Description   

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.



 Comments   
Comment by Githook User [ 05/Jan/24 ]

Author:

{'name': 'Patrick Freed', 'email': 'patrick.freed@mongodb.com', 'username': 'patrickfreed'}

Message: SERVER-82676: gRPC unit tests reuse port, causing conflicts with concurrently running tests
Branch: v7.2
https://github.com/mongodb/mongo/commit/44f9d1c74a9e6c37bc7b67db876336f6e1064a50

Comment by Githook User [ 10/Nov/23 ]

Author:

{'name': 'Patrick Freed', 'email': 'patrick.freed@mongodb.com', 'username': 'patrickfreed'}

Message: SERVER-82676 Bind to ephemeral ports in gRPC unit tests
Branch: master
https://github.com/mongodb/mongo/commit/6ef567c6f701c9ad13e342ebd5af9618fb4fea27

Generated at Thu Feb 08 06:49:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.