Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

Commit a0f35fa

Browse files
committed
small comment tweaks
1 parent 529116a commit a0f35fa

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

mdata/cache/accnt/flat_accnt_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ func TestMetricDeleting(t *testing.T) {
117117
resetCounters()
118118
a := NewFlatAccnt(12)
119119

120-
var metric1 string = "metric1"
121-
var metric2 string = "metric2"
120+
metric1 := "metric1"
121+
metric2 := "metric2"
122122

123123
a.AddChunk(metric1, 1, 2)
124124
a.AddChunk(metric2, 1, 2)
@@ -132,11 +132,11 @@ func TestMetricDeleting(t *testing.T) {
132132
total := a.GetTotal()
133133
expect_total := uint64(6)
134134
if total != expect_total {
135-
t.Fatalf("Expected total to be %d, got %d", expect_total, total)
135+
t.Fatalf("Expected total %d, got %d", expect_total, total)
136136
}
137137

138138
if cacheSizeUsed.Peek() != expect_total {
139-
t.Fatalf("Expected total to be %d, got %d", expect_total, total)
139+
t.Fatalf("Expected total %d, got %d", expect_total, total)
140140
}
141141

142142
if _, ok := a.metrics[metric1]; ok {

mdata/cache/ccache_test.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -562,12 +562,12 @@ func testMetricDelete(t *testing.T, cc *CCache) {
562562
delSeries, delArchives := cc.DelMetric(rawMetric1)
563563
expectDelSeries := 1
564564
if delSeries != expectDelSeries {
565-
t.Fatalf("Expected exactly %d series to get deleted, but got %d", expectDelSeries, delSeries)
565+
t.Fatalf("Expected exactly %d deleted series, but got %d", expectDelSeries, delSeries)
566566
}
567567

568568
expectDelArchives := 2
569569
if delArchives != expectDelArchives {
570-
t.Fatalf("Expected exactly %d archives to get deleted, but got %d", expectDelArchives, delArchives)
570+
t.Fatalf("Expected exactly %d deleted archives, but got %d", expectDelArchives, delArchives)
571571
}
572572

573573
// check if metric1_1 returns no results anymore
@@ -576,7 +576,7 @@ func testMetricDelete(t *testing.T, cc *CCache) {
576576
t.Fatalf("Expected to have %d values, got %d", 0, len(res.Start))
577577
}
578578

579-
// check if metric1_1 returns no results anymore
579+
// check if metric1_2 returns no results anymore
580580
res = cc.Search(test.NewContext(), metric1_2, 1000, uint32(1000+itgenCount*len(values)))
581581
if len(res.Start) != 0 {
582582
t.Fatalf("Expected to have %d values, got %d", 0, len(res.Start))
@@ -604,12 +604,12 @@ func testMetricDelete(t *testing.T, cc *CCache) {
604604
delSeries, delArchives = cc.Reset()
605605
expectDelSeries = 2
606606
if delSeries != expectDelSeries {
607-
t.Fatalf("Expected exactly %d series to get deleted, but got %d", expectDelSeries, delSeries)
607+
t.Fatalf("Expected exactly deleted %d series, but got %d", expectDelSeries, delSeries)
608608
}
609609

610610
expectDelArchives = 3
611611
if delArchives != expectDelArchives {
612-
t.Fatalf("Expected exactly %d archives to get deleted, but got %d", expectDelArchives, delArchives)
612+
t.Fatalf("Expected exactly deleted %d archives, but got %d", expectDelArchives, delArchives)
613613
}
614614

615615
// check if metric1_1 returns no results anymore

0 commit comments

Comments
 (0)