Skip to content

Commit e6b7c0e

Browse files
committed
Creating Test
Signed-off-by: alanprot <[email protected]>
1 parent c46aec6 commit e6b7c0e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

pkg/ingester/ingester_test.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5085,12 +5085,16 @@ func TestExpendedPostingsCacheIsolation(t *testing.T) {
50855085
cfg.BlocksStorageConfig.TSDB.BlockRanges = []time.Duration{2 * time.Hour}
50865086
cfg.LifecyclerConfig.JoinAfter = 0
50875087
cfg.BlocksStorageConfig.TSDB.PostingsCache = cortex_tsdb.TSDBPostingsCacheConfig{
5088-
SeedSize: 1, // lets make sure all metric names collide
5088+
SeedSize: 3, // lets make sure all metric names collide
50895089
Head: cortex_tsdb.PostingsCacheConfig{
5090-
Enabled: true,
5090+
Enabled: true,
5091+
Ttl: time.Hour,
5092+
MaxBytes: 1024 * 1024 * 1024,
50915093
},
50925094
Blocks: cortex_tsdb.PostingsCacheConfig{
5093-
Enabled: true,
5095+
Enabled: true,
5096+
Ttl: time.Hour,
5097+
MaxBytes: 1024 * 1024 * 1024,
50945098
},
50955099
}
50965100

@@ -5109,7 +5113,7 @@ func TestExpendedPostingsCacheIsolation(t *testing.T) {
51095113
defer wg.Done()
51105114
userId := fmt.Sprintf("user%v", j)
51115115
ctx := user.InjectOrgID(context.Background(), userId)
5112-
_, err = i.Push(ctx, cortexpb.ToWriteRequest(
5116+
_, err := i.Push(ctx, cortexpb.ToWriteRequest(
51135117
[]labels.Labels{labels.FromStrings(labels.MetricName, "foo", "userId", userId)}, []cortexpb.Sample{{Value: 2, TimestampMs: 4 * 60 * 60 * 1000}}, nil, nil, cortexpb.API))
51145118
require.NoError(t, err)
51155119
}()

0 commit comments

Comments
 (0)