From 151d0d383193a9373ed566bae4735331ad1d4221 Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Fri, 22 Apr 2016 22:22:12 -0700 Subject: [PATCH] etcd-tester: flag consistency-check --- tools/functional-tester/etcd-tester/main.go | 9 +++++---- tools/functional-tester/etcd-tester/tester.go | 10 +++++++--- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/tools/functional-tester/etcd-tester/main.go b/tools/functional-tester/etcd-tester/main.go index 187d5a266..f495368ae 100644 --- a/tools/functional-tester/etcd-tester/main.go +++ b/tools/functional-tester/etcd-tester/main.go @@ -33,7 +33,7 @@ func main() { 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.") 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.") flag.Parse() @@ -73,9 +73,10 @@ func main() { } t := &tester{ - failures: schedule, - cluster: c, - limit: *limit, + failures: schedule, + cluster: c, + limit: *limit, + consistencyCheck: *consistencyCheck, } sh := statusHandler{status: &t.status} diff --git a/tools/functional-tester/etcd-tester/tester.go b/tools/functional-tester/etcd-tester/tester.go index f6a13367e..448bc3aff 100644 --- a/tools/functional-tester/etcd-tester/tester.go +++ b/tools/functional-tester/etcd-tester/tester.go @@ -20,9 +20,10 @@ import ( ) type tester struct { - failures []failure - cluster *cluster - limit int + failures []failure + cluster *cluster + limit int + consistencyCheck bool status Status } @@ -81,6 +82,9 @@ func (tt *tester) runLoop() { } plog.Printf("[round#%d case#%d] recovered failure", i, j) + if !tt.consistencyCheck { + continue + } if tt.cluster.v2Only { plog.Printf("[round#%d case#%d] succeed!", i, j) continue