Skip to content

Commit 772ed25

Browse files
committed
Fixed ingester tests after rebasing
Signed-off-by: Marco Pracucci <[email protected]>
1 parent bc4e8b1 commit 772ed25

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

pkg/ingester/ingester_v2_test.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,21 @@ func TestIngester_v2Push(t *testing.T) {
139139
registry := prometheus.NewRegistry()
140140

141141
// Create a mocked ingester
142-
i, cleanup, err := newIngesterMockWithTSDBStorage(defaultIngesterTestConfig(), registry)
142+
cfg := defaultIngesterTestConfig()
143+
cfg.LifecyclerConfig.JoinAfter = 0
144+
145+
i, cleanup, err := newIngesterMockWithTSDBStorage(cfg, registry)
143146
require.NoError(t, err)
144147
defer i.Shutdown()
145148
defer cleanup()
146149

147150
ctx := user.InjectOrgID(context.Background(), "test")
148151

152+
// Wait until the ingester is ACTIVE
153+
test.Poll(t, 100*time.Millisecond, ring.ACTIVE, func() interface{} {
154+
return i.lifecycler.GetState()
155+
})
156+
149157
// Push timeseries
150158
for idx, req := range testData.reqs {
151159
_, err := i.v2Push(ctx, req)

0 commit comments

Comments
 (0)