From ac2859057a47b987f1eea5bdfdf57c1c40a3394f Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Fri, 27 May 2016 11:10:10 -0700 Subject: [PATCH] integration: move cap enabling to init --- integration/cluster.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/integration/cluster.go b/integration/cluster.go index 9b6e749c3..68f6bd112 100644 --- a/integration/cluster.go +++ b/integration/cluster.go @@ -85,6 +85,11 @@ type cluster struct { Members []*member } +func init() { + // manually enable v3 capability since we know the cluster members all support v3. + api.EnableCapability(api.V3rpcCapability) +} + func (c *cluster) fillClusterForMembers() error { if c.cfg.DiscoveryURL != "" { // cluster will be discovered @@ -761,9 +766,6 @@ func NewClusterV3(t *testing.T, cfg *ClusterConfig) *ClusterV3 { } clus.Launch(t) - // manually enable v3 capability since we know we are starting a v3 cluster here. - api.EnableCapability(api.V3rpcCapability) - return clus }