From 12f27f7b788f7a8daba3e902681632f2dd9b8e3b Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Tue, 19 Jan 2016 21:48:48 -0800 Subject: [PATCH] testing semaphore --- integration/v3_grpc_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/integration/v3_grpc_test.go b/integration/v3_grpc_test.go index ac38f5cc2de7..8b6dfad3878c 100644 --- a/integration/v3_grpc_test.go +++ b/integration/v3_grpc_test.go @@ -695,6 +695,7 @@ func TestV3WatchMultipleEventsFromUnsynced(t *testing.T) { Kv: &storagepb.KeyValue{Key: []byte("foo1"), Value: []byte("bar"), CreateRevision: 3, ModRevision: 5, Version: 2}, }, } + st := time.Now() lastEvents := []*storagepb.Event{} for len(lastEvents) < 2 { resp, err := wStream.Recv() @@ -705,13 +706,16 @@ func TestV3WatchMultipleEventsFromUnsynced(t *testing.T) { continue } lastEvents = append(lastEvents, resp.Events...) + fmt.Println("lastEvents adding:", resp.Events) } + fmt.Println("lastEvents loop done... took", time.Since(st)) sort.Sort(eventsSortByKey(lastEvents)) if !reflect.DeepEqual(lastEvents, lastWevents) { t.Errorf("lastEvents got = %+v, want = %+v", lastEvents, lastWevents) } + fmt.Println("wait...") rok, nr := WaitResponse(wStream, 1*time.Second) if !rok { t.Errorf("unexpected pb.WatchResponse is received %+v", nr)