Fix deadlock in 'go test -tags cluster_proxy -v ./integration/... ./clientv3/...'

Cherry pick https://github.com/etcd-io/etcd/pull/12319 to 3.4.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
This commit is contained in:
Benjamin Wang
2022-06-28 13:44:47 +08:00
parent 4e88cce06c
commit 1c9fa07cd7
5 changed files with 39 additions and 28 deletions

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package naming
package naming_test
import (
"context"
@ -21,6 +21,7 @@ import (
"testing"
etcd "go.etcd.io/etcd/clientv3"
namingv3 "go.etcd.io/etcd/clientv3/naming"
"go.etcd.io/etcd/integration"
"go.etcd.io/etcd/pkg/testutil"
@ -33,7 +34,7 @@ func TestGRPCResolver(t *testing.T) {
clus := integration.NewClusterV3(t, &integration.ClusterConfig{Size: 1})
defer clus.Terminate(t)
r := GRPCResolver{
r := namingv3.GRPCResolver{
Client: clus.RandClient(),
}
@ -107,7 +108,7 @@ func TestGRPCResolverMulti(t *testing.T) {
t.Fatal(err)
}
r := GRPCResolver{c}
r := namingv3.GRPCResolver{c}
w, err := r.Resolve("foo")
if err != nil {