test: Always run server with grpc enabled

This commit is contained in:
Marek Siarkowicz 2022-01-18 16:34:15 +01:00
parent 51f72915e4
commit de30257d79
3 changed files with 3 additions and 17 deletions

View File

@ -139,8 +139,6 @@ type ClusterConfig struct {
AuthToken string
UseGRPC bool
QuotaBackendBytes int64
MaxTxnOps uint
@ -319,7 +317,6 @@ func (c *Cluster) mustNewMember(t testutil.TB) *Member {
WatchProgressNotifyInterval: c.Cfg.WatchProgressNotifyInterval,
ExperimentalMaxLearners: c.Cfg.ExperimentalMaxLearners,
StrictReconfigCheck: c.Cfg.StrictReconfigCheck,
UseGRPC: c.Cfg.UseGRPC,
})
m.DiscoveryURL = c.Cfg.DiscoveryURL
return m
@ -628,7 +625,6 @@ type MemberConfig struct {
WatchProgressNotifyInterval time.Duration
ExperimentalMaxLearners int
StrictReconfigCheck bool
UseGRPC bool
}
// MustNewMember return an inited member with the given name. If peerTLS is
@ -741,11 +737,9 @@ func MustNewMember(t testutil.TB, mcfg MemberConfig) *Member {
m.GrpcServerRecorder = &grpc_testing.GrpcRecorder{}
m.Logger = memberLogger(t, mcfg.Name)
m.StrictReconfigCheck = mcfg.StrictReconfigCheck
if mcfg.UseGRPC {
if err := m.listenGRPC(); err != nil {
t.Fatal(err)
}
}
t.Cleanup(func() {
// if we didn't cleanup the logger, the consecutive test
// might reuse this (t).
@ -1403,8 +1397,6 @@ func NewClusterV3(t testutil.TB, cfg *ClusterConfig) *ClusterV3 {
assertInTestContext(t)
cfg.UseGRPC = true
clus := &ClusterV3{
Cluster: newClusterFromConfig(t, cfg),
}

View File

@ -162,7 +162,7 @@ func testDecreaseClusterSize(t *testing.T, size int) {
func TestForceNewCluster(t *testing.T) {
integration.BeforeTest(t)
c := integration.NewClusterV3(t, &integration.ClusterConfig{Size: 3, UseBridge: true, UseGRPC: true})
c := integration.NewClusterV3(t, &integration.ClusterConfig{Size: 3, UseBridge: true})
cc := integration.MustNewHTTPClient(t, []string{c.Members[0].URL()}, nil)
kapi := client.NewKeysAPI(cc)
ctx, cancel := context.WithTimeout(context.Background(), integration.RequestTimeout)

View File

@ -1550,12 +1550,6 @@ func TestV3RangeRequest(t *testing.T) {
}
}
func newClusterV3NoClients(t *testing.T, cfg *integration.ClusterConfig) *integration.ClusterV3 {
cfg.UseGRPC = true
clus := integration.NewClusterV3(t, cfg)
return clus
}
// TestTLSGRPCRejectInsecureClient checks that connection is rejected if server is TLS but not client.
func TestTLSGRPCRejectInsecureClient(t *testing.T) {
integration.BeforeTest(t)