浏览代码

*: disable grpc client log in tests by default

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
Gyu-Ho Lee 8 年之前
父节点
当前提交
f49f5c9094
共有 3 个文件被更改,包括 21 次插入3 次删除
  1. 7 1
      clientv3/integration/logger_test.go
  2. 7 1
      clientv3/ordering/logger_test.go
  3. 7 1
      integration/logger_test.go

+ 7 - 1
clientv3/integration/logger_test.go

@@ -14,8 +14,14 @@
 
 package integration
 
-import "github.com/coreos/pkg/capnslog"
+import (
+	"io/ioutil"
+
+	"github.com/coreos/pkg/capnslog"
+	"google.golang.org/grpc/grpclog"
+)
 
 func init() {
 	capnslog.SetGlobalLogLevel(capnslog.CRITICAL)
+	grpclog.SetLoggerV2(grpclog.NewLoggerV2(ioutil.Discard, ioutil.Discard, ioutil.Discard))
 }

+ 7 - 1
clientv3/ordering/logger_test.go

@@ -14,8 +14,14 @@
 
 package ordering
 
-import "github.com/coreos/pkg/capnslog"
+import (
+	"io/ioutil"
+
+	"github.com/coreos/pkg/capnslog"
+	"google.golang.org/grpc/grpclog"
+)
 
 func init() {
 	capnslog.SetGlobalLogLevel(capnslog.CRITICAL)
+	grpclog.SetLoggerV2(grpclog.NewLoggerV2(ioutil.Discard, ioutil.Discard, ioutil.Discard))
 }

+ 7 - 1
integration/logger_test.go

@@ -14,10 +14,16 @@
 
 package integration
 
-import "github.com/coreos/pkg/capnslog"
+import (
+	"io/ioutil"
+
+	"github.com/coreos/pkg/capnslog"
+	"google.golang.org/grpc/grpclog"
+)
 
 const defaultLogLevel = capnslog.CRITICAL
 
 func init() {
 	capnslog.SetGlobalLogLevel(defaultLogLevel)
+	grpclog.SetLoggerV2(grpclog.NewLoggerV2(ioutil.Discard, ioutil.Discard, ioutil.Discard))
 }