Browse Source

mvcc: remove unused parameters

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Gyuho Lee 7 years ago
parent
commit
1a83c6ad80
1 changed files with 4 additions and 4 deletions
  1. 4 4
      mvcc/kv_test.go

+ 4 - 4
mvcc/kv_test.go

@@ -639,13 +639,13 @@ func TestKVRestore(t *testing.T) {
 			kvss = append(kvss, r.KVs)
 			kvss = append(kvss, r.KVs)
 		}
 		}
 
 
-		keysBefore := readGaugeInt(&keysGauge)
+		keysBefore := readGaugeInt(keysGauge)
 		s.Close()
 		s.Close()
 
 
 		// ns should recover the the previous state from backend.
 		// ns should recover the the previous state from backend.
 		ns := NewStore(zap.NewExample(), b, &lease.FakeLessor{}, nil)
 		ns := NewStore(zap.NewExample(), b, &lease.FakeLessor{}, nil)
 
 
-		if keysRestore := readGaugeInt(&keysGauge); keysBefore != keysRestore {
+		if keysRestore := readGaugeInt(keysGauge); keysBefore != keysRestore {
 			t.Errorf("#%d: got %d key count, expected %d", i, keysRestore, keysBefore)
 			t.Errorf("#%d: got %d key count, expected %d", i, keysRestore, keysBefore)
 		}
 		}
 
 
@@ -664,9 +664,9 @@ func TestKVRestore(t *testing.T) {
 	}
 	}
 }
 }
 
 
-func readGaugeInt(g *prometheus.Gauge) int {
+func readGaugeInt(g prometheus.Gauge) int {
 	ch := make(chan prometheus.Metric, 1)
 	ch := make(chan prometheus.Metric, 1)
-	keysGauge.Collect(ch)
+	g.Collect(ch)
 	m := <-ch
 	m := <-ch
 	mm := &dto.Metric{}
 	mm := &dto.Metric{}
 	m.Write(mm)
 	m.Write(mm)