mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
integration: rename "SnapshotCount"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
parent
5235fc2106
commit
aa99ed54b7
@ -117,17 +117,25 @@ func init() {
|
||||
}
|
||||
|
||||
type ClusterConfig struct {
|
||||
Size int
|
||||
PeerTLS *transport.TLSInfo
|
||||
ClientTLS *transport.TLSInfo
|
||||
DiscoveryURL string
|
||||
UseGRPC bool
|
||||
QuotaBackendBytes int64
|
||||
MaxTxnOps uint
|
||||
MaxRequestBytes uint
|
||||
Size int
|
||||
PeerTLS *transport.TLSInfo
|
||||
ClientTLS *transport.TLSInfo
|
||||
|
||||
DiscoveryURL string
|
||||
|
||||
UseGRPC bool
|
||||
|
||||
QuotaBackendBytes int64
|
||||
|
||||
MaxTxnOps uint
|
||||
MaxRequestBytes uint
|
||||
SnapshotCount uint64
|
||||
SnapshotCatchUpEntries uint64
|
||||
|
||||
GRPCKeepAliveMinTime time.Duration
|
||||
GRPCKeepAliveInterval time.Duration
|
||||
GRPCKeepAliveTimeout time.Duration
|
||||
|
||||
// SkipCreatingClient to skip creating clients for each member.
|
||||
SkipCreatingClient bool
|
||||
|
||||
@ -269,6 +277,8 @@ func (c *cluster) mustNewMember(t *testing.T) *member {
|
||||
quotaBackendBytes: c.cfg.QuotaBackendBytes,
|
||||
maxTxnOps: c.cfg.MaxTxnOps,
|
||||
maxRequestBytes: c.cfg.MaxRequestBytes,
|
||||
snapshotCount: c.cfg.SnapshotCount,
|
||||
snapshotCatchUpEntries: c.cfg.SnapshotCatchUpEntries,
|
||||
grpcKeepAliveMinTime: c.cfg.GRPCKeepAliveMinTime,
|
||||
grpcKeepAliveInterval: c.cfg.GRPCKeepAliveInterval,
|
||||
grpcKeepAliveTimeout: c.cfg.GRPCKeepAliveTimeout,
|
||||
@ -550,6 +560,8 @@ type memberConfig struct {
|
||||
quotaBackendBytes int64
|
||||
maxTxnOps uint
|
||||
maxRequestBytes uint
|
||||
snapshotCount uint64
|
||||
snapshotCatchUpEntries uint64
|
||||
grpcKeepAliveMinTime time.Duration
|
||||
grpcKeepAliveInterval time.Duration
|
||||
grpcKeepAliveTimeout time.Duration
|
||||
@ -612,6 +624,14 @@ func mustNewMember(t *testing.T, mcfg memberConfig) *member {
|
||||
if m.MaxRequestBytes == 0 {
|
||||
m.MaxRequestBytes = embed.DefaultMaxRequestBytes
|
||||
}
|
||||
m.SnapshotCount = etcdserver.DefaultSnapshotCount
|
||||
if mcfg.snapshotCount != 0 {
|
||||
m.SnapshotCount = mcfg.snapshotCount
|
||||
}
|
||||
m.SnapshotCatchUpEntries = etcdserver.DefaultSnapshotCatchUpEntries
|
||||
if mcfg.snapshotCatchUpEntries != 0 {
|
||||
m.SnapshotCatchUpEntries = mcfg.snapshotCatchUpEntries
|
||||
}
|
||||
m.AuthToken = "simple" // for the purpose of integration testing, simple token is enough
|
||||
m.BcryptCost = uint(bcrypt.MinCost) // use min bcrypt cost to speedy up integration testing
|
||||
|
||||
|
@ -251,7 +251,7 @@ func testIssue2746(t *testing.T, members int) {
|
||||
c := NewCluster(t, members)
|
||||
|
||||
for _, m := range c.Members {
|
||||
m.SnapCount = 10
|
||||
m.SnapshotCount = 10
|
||||
}
|
||||
|
||||
c.Launch(t)
|
||||
|
@ -86,7 +86,7 @@ func TestLaunchDuplicateMemberShouldFail(t *testing.T) {
|
||||
func TestSnapshotAndRestartMember(t *testing.T) {
|
||||
defer testutil.AfterTest(t)
|
||||
m := mustNewMember(t, memberConfig{name: "snapAndRestartTest"})
|
||||
m.SnapCount = 100
|
||||
m.SnapshotCount = 100
|
||||
m.Launch()
|
||||
defer m.Terminate(t)
|
||||
m.WaitOK(t)
|
||||
|
Loading…
x
Reference in New Issue
Block a user