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

Commit 4bf5018

Browse files
committed
wu
1 parent 8031b63 commit 4bf5018

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

api/dataprocessor_test.go

+10-7
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,6 @@ func TestGetSeriesCachedStore(t *testing.T) {
499499
metrics := mdata.NewAggMetrics(store, &cache.MockCache{}, false, 0, 0, 0)
500500
srv.BindMemoryStore(metrics)
501501
metric := test.GetAMKey(1)
502-
var c *cache.CCache
503502
var itgen *chunk.IterGen
504503
var prevts uint32
505504

@@ -527,7 +526,7 @@ func TestGetSeriesCachedStore(t *testing.T) {
527526
}
528527

529528
// going through all testcases
530-
for _, tc := range testcases {
529+
for j, tc := range testcases {
531530
fmt.Println("TESTCASE", tc)
532531
pattern := tc.Pattern
533532

@@ -541,12 +540,16 @@ func TestGetSeriesCachedStore(t *testing.T) {
541540
// and various ranges between
542541
// we increment from and to in thirds of a span,
543542
// because incrementing by 1 would be needlessly expensive
544-
step := span / 3
543+
step := span / 2
544+
i := 0
545545
for from := start; from <= lastTs; from += step {
546546
for to := from; to <= lastTs; to += step {
547-
fmt.Println(from, to)
547+
if j == 7 && i%20 == 0 {
548+
fmt.Println(">", i)
549+
}
550+
i++
548551
// use fresh store and cache
549-
c = cache.NewCCache()
552+
c := cache.NewCCache()
550553
srv.BindCache(c)
551554
store.Reset()
552555

@@ -591,7 +594,7 @@ func TestGetSeriesCachedStore(t *testing.T) {
591594
// we use the tsTracker to increase together with the iterators and compare at each step
592595
tsTracker := expectResFrom
593596

594-
tsSlice := make([]uint32, 0)
597+
var tsSlice []uint32
595598
for i, it := range iters {
596599
for it.Next() {
597600
ts, _ := it.Values()
@@ -676,8 +679,8 @@ func TestGetSeriesCachedStore(t *testing.T) {
676679
c.Stop()
677680
}
678681
}
682+
fmt.Println("DID", i, "iterations")
679683
}
680-
fmt.Println("all done")
681684
}
682685

683686
func TestGetSeriesAggMetrics(t *testing.T) {

0 commit comments

Comments
 (0)