Browse Source

integration: reset default logging level in TestRestartRemoved

Anthony Romano 8 years ago
parent
commit
5b4677b7d7
2 changed files with 5 additions and 1 deletions
  1. 2 0
      integration/cluster_test.go
  2. 3 1
      integration/logger_test.go

+ 2 - 0
integration/cluster_test.go

@@ -447,7 +447,9 @@ func TestRejectUnhealthyRemove(t *testing.T) {
 // (see https://github.com/coreos/etcd/issues/7512 for more).
 func TestRestartRemoved(t *testing.T) {
 	defer testutil.AfterTest(t)
+
 	capnslog.SetGlobalLogLevel(capnslog.INFO)
+	defer capnslog.SetGlobalLogLevel(defaultLogLevel)
 
 	// 1. start single-member cluster
 	c := NewCluster(t, 1)

+ 3 - 1
integration/logger_test.go

@@ -16,6 +16,8 @@ package integration
 
 import "github.com/coreos/pkg/capnslog"
 
+const defaultLogLevel = capnslog.CRITICAL
+
 func init() {
-	capnslog.SetGlobalLogLevel(capnslog.CRITICAL)
+	capnslog.SetGlobalLogLevel(defaultLogLevel)
 }