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

Commit 529116a

Browse files
committed
bit more post-Reset testing
1 parent 5dac7e8 commit 529116a

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

mdata/cache/ccache_test.go

+19
Original file line numberDiff line numberDiff line change
@@ -611,4 +611,23 @@ func testMetricDelete(t *testing.T, cc *CCache) {
611611
if delArchives != expectDelArchives {
612612
t.Fatalf("Expected exactly %d archives to get deleted, but got %d", expectDelArchives, delArchives)
613613
}
614+
615+
// check if metric1_1 returns no results anymore
616+
res = cc.Search(test.NewContext(), metric1_1, 1000, uint32(1000+itgenCount*len(values)))
617+
if len(res.Start) != 0 {
618+
t.Fatalf("Expected to have %d values, got %d", 0, len(res.Start))
619+
}
620+
621+
// check if metric1_1 returns no results anymore
622+
res = cc.Search(test.NewContext(), metric1_2, 1000, uint32(1000+itgenCount*len(values)))
623+
if len(res.Start) != 0 {
624+
t.Fatalf("Expected to have %d values, got %d", 0, len(res.Start))
625+
}
626+
627+
// check if metric2_1 returns no results anymore
628+
res = cc.Search(test.NewContext(), metric2_1, 1000, uint32(1000+itgenCount*len(values)))
629+
if len(res.Start) != 0 {
630+
t.Fatalf("Expected to have %d values, got %d", 0, len(res.Start))
631+
}
632+
614633
}

0 commit comments

Comments
 (0)