From 7b2ce707835fca42717486ccc1e1888bf8a68dbe Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Tue, 9 Feb 2016 17:12:03 -0800 Subject: [PATCH] etcd-tester: count success for v3 needed for snapshot count comparison --- tools/functional-tester/etcd-tester/stresser.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/functional-tester/etcd-tester/stresser.go b/tools/functional-tester/etcd-tester/stresser.go index f9b55a2e7..3ba71264a 100644 --- a/tools/functional-tester/etcd-tester/stresser.go +++ b/tools/functional-tester/etcd-tester/stresser.go @@ -56,6 +56,8 @@ type stresser struct { wg *sync.WaitGroup cancel func() conn *grpc.ClientConn + + success int } func (s *stresser) Stress() error { @@ -90,6 +92,9 @@ func (s *stresser) Stress() error { if err != nil { return } + s.mu.Lock() + s.success++ + s.mu.Unlock() } }(i) } @@ -111,7 +116,7 @@ func (s *stresser) Report() (int, int) { s.mu.Lock() defer s.mu.Unlock() // TODO: find a better way to report v3 tests - return -1, -1 + return s.success, -1 } type stresserV2 struct {