-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Open
Description
There are a couple of issues that need fixing here:
- There is a data race between the test when it tries to unregister an LB policy (
pick_first) in the middle of the test, and the actual code that is reading from the LB policy registry. This can be eliminated by moving this piece of code to the top of the test. But once we do that, we hit another issue:- The test overrides the existing implementation of
pick_firstwith a stub policy that wrapspick_first. The problem is that the existingpick_firstpolicy is already being used for the xDS channel to the management server
- The test overrides the existing implementation of
The ideal fix for this test would be as follows:
- Use a custom LB policy as the child policy. We support specifying custom LB policies in the cluster resource. See: https://github.com/grpc/grpc-go/blob/master/internal/xds/xdsclient/xdslbregistry/xdslbregistry_test.go and https://github.com/grpc/grpc-go/blob/master/test/xds/xds_client_custom_lb_test.go for ideas on how to register and configure a custom LB policy for the purpose of this test.