@@ -462,7 +462,7 @@ func TestMarkForDelete_SeriesCleanup(t *testing.T) {
462
462
{
463
463
name : "no chunk and series deleted" ,
464
464
chunks : []chunk.Chunk {
465
- createChunk (t , userID , labels.Labels {labels.Label {Name : "foo" , Value : "1" }}, now . Add (- 30 * time .Minute ), now ),
465
+ createChunk (t , userID , labels.Labels {labels.Label {Name : "foo" , Value : "1" }}, todaysTableInterval . Start , todaysTableInterval . Start . Add (30 * time .Minute )),
466
466
},
467
467
expiry : []chunkExpiry {
468
468
{
@@ -482,7 +482,7 @@ func TestMarkForDelete_SeriesCleanup(t *testing.T) {
482
482
{
483
483
name : "only one chunk in store which gets deleted" ,
484
484
chunks : []chunk.Chunk {
485
- createChunk (t , userID , labels.Labels {labels.Label {Name : "foo" , Value : "1" }}, now . Add (- 30 * time .Minute ), now ),
485
+ createChunk (t , userID , labels.Labels {labels.Label {Name : "foo" , Value : "1" }}, todaysTableInterval . Start , todaysTableInterval . Start . Add (30 * time .Minute )),
486
486
},
487
487
expiry : []chunkExpiry {
488
488
{
@@ -502,14 +502,14 @@ func TestMarkForDelete_SeriesCleanup(t *testing.T) {
502
502
{
503
503
name : "only one chunk in store which gets partially deleted" ,
504
504
chunks : []chunk.Chunk {
505
- createChunk (t , userID , labels.Labels {labels.Label {Name : "foo" , Value : "1" }}, now . Add (- 30 * time .Minute ), now ),
505
+ createChunk (t , userID , labels.Labels {labels.Label {Name : "foo" , Value : "1" }}, todaysTableInterval . Start , todaysTableInterval . Start . Add (30 * time .Minute )),
506
506
},
507
507
expiry : []chunkExpiry {
508
508
{
509
509
isExpired : true ,
510
510
nonDeletedIntervals : []model.Interval {{
511
- Start : now . Add ( - 15 * time . Minute ) ,
512
- End : now ,
511
+ Start : todaysTableInterval . Start ,
512
+ End : todaysTableInterval . Start . Add ( 15 * time . Minute ) ,
513
513
}},
514
514
},
515
515
},
@@ -526,8 +526,8 @@ func TestMarkForDelete_SeriesCleanup(t *testing.T) {
526
526
{
527
527
name : "one of two chunks deleted" ,
528
528
chunks : []chunk.Chunk {
529
- createChunk (t , userID , labels.Labels {labels.Label {Name : "foo" , Value : "1" }}, now . Add (- 30 * time .Minute ), now ),
530
- createChunk (t , userID , labels.Labels {labels.Label {Name : "foo" , Value : "2" }}, now . Add (- 30 * time .Minute ), now ),
529
+ createChunk (t , userID , labels.Labels {labels.Label {Name : "foo" , Value : "1" }}, todaysTableInterval . Start , todaysTableInterval . Start . Add (30 * time .Minute )),
530
+ createChunk (t , userID , labels.Labels {labels.Label {Name : "foo" , Value : "2" }}, todaysTableInterval . Start , todaysTableInterval . Start . Add (30 * time .Minute )),
531
531
},
532
532
expiry : []chunkExpiry {
533
533
{
@@ -550,8 +550,8 @@ func TestMarkForDelete_SeriesCleanup(t *testing.T) {
550
550
{
551
551
name : "one of two chunks partially deleted" ,
552
552
chunks : []chunk.Chunk {
553
- createChunk (t , userID , labels.Labels {labels.Label {Name : "foo" , Value : "1" }}, now . Add (- 30 * time .Minute ), now ),
554
- createChunk (t , userID , labels.Labels {labels.Label {Name : "foo" , Value : "2" }}, now . Add (- 30 * time .Minute ), now ),
553
+ createChunk (t , userID , labels.Labels {labels.Label {Name : "foo" , Value : "1" }}, todaysTableInterval . Start , todaysTableInterval . Start . Add (30 * time .Minute )),
554
+ createChunk (t , userID , labels.Labels {labels.Label {Name : "foo" , Value : "2" }}, todaysTableInterval . Start , todaysTableInterval . Start . Add (30 * time .Minute )),
555
555
},
556
556
expiry : []chunkExpiry {
557
557
{
@@ -560,8 +560,8 @@ func TestMarkForDelete_SeriesCleanup(t *testing.T) {
560
560
{
561
561
isExpired : true ,
562
562
nonDeletedIntervals : []model.Interval {{
563
- Start : now . Add ( - 15 * time . Minute ) ,
564
- End : now ,
563
+ Start : todaysTableInterval . Start ,
564
+ End : todaysTableInterval . Start . Add ( 15 * time . Minute ) ,
565
565
}},
566
566
},
567
567
},
0 commit comments