Merge pull request #5472 from xiang90/fix_cap

integration: move cap enabling to init
This commit is contained in:
Xiang Li 2016-05-27 11:42:07 -07:00
commit d8f325dabf

View File

@ -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
}