etcd-tester: flag consistency-check
This commit is contained in:
@ -33,7 +33,7 @@ func main() {
|
|||||||
stressKeySuffixRange := flag.Int("stress-key-count", 250000, "the count of key range written into etcd.")
|
stressKeySuffixRange := flag.Int("stress-key-count", 250000, "the count of key range written into etcd.")
|
||||||
limit := flag.Int("limit", 3, "the limit of rounds to run failure set.")
|
limit := flag.Int("limit", 3, "the limit of rounds to run failure set.")
|
||||||
schedCases := flag.String("schedule-cases", "", "test case schedule")
|
schedCases := flag.String("schedule-cases", "", "test case schedule")
|
||||||
|
consistencyCheck := flag.Bool("consistency-check", true, "true to check consistency (revision, hash)")
|
||||||
isV2Only := flag.Bool("v2-only", false, "'true' to run V2 only tester.")
|
isV2Only := flag.Bool("v2-only", false, "'true' to run V2 only tester.")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
@ -73,9 +73,10 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
t := &tester{
|
t := &tester{
|
||||||
failures: schedule,
|
failures: schedule,
|
||||||
cluster: c,
|
cluster: c,
|
||||||
limit: *limit,
|
limit: *limit,
|
||||||
|
consistencyCheck: *consistencyCheck,
|
||||||
}
|
}
|
||||||
|
|
||||||
sh := statusHandler{status: &t.status}
|
sh := statusHandler{status: &t.status}
|
||||||
|
@ -20,9 +20,10 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type tester struct {
|
type tester struct {
|
||||||
failures []failure
|
failures []failure
|
||||||
cluster *cluster
|
cluster *cluster
|
||||||
limit int
|
limit int
|
||||||
|
consistencyCheck bool
|
||||||
|
|
||||||
status Status
|
status Status
|
||||||
}
|
}
|
||||||
@ -81,6 +82,9 @@ func (tt *tester) runLoop() {
|
|||||||
}
|
}
|
||||||
plog.Printf("[round#%d case#%d] recovered failure", i, j)
|
plog.Printf("[round#%d case#%d] recovered failure", i, j)
|
||||||
|
|
||||||
|
if !tt.consistencyCheck {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if tt.cluster.v2Only {
|
if tt.cluster.v2Only {
|
||||||
plog.Printf("[round#%d case#%d] succeed!", i, j)
|
plog.Printf("[round#%d case#%d] succeed!", i, j)
|
||||||
continue
|
continue
|
||||||
|
Reference in New Issue
Block a user