MCPcopy Create free account
hub / github.com/cortexproject/cortex / NewDeleteSeriesTest

Function NewDeleteSeriesTest

pkg/testexporter/correctness/delete_series.go:77–94  ·  view source on GitHub ↗
(name string, f func(time.Time) float64, cfg DeleteSeriesTestConfig, commonTestConfig CommonTestConfig)

Source from the content-addressed store, hash-verified

75}
76
77func NewDeleteSeriesTest(name string, f func(time.Time) float64, cfg DeleteSeriesTestConfig, commonTestConfig CommonTestConfig) Case {
78 commonTestConfig.timeQueryStart = cfg.timeQueryStart
79 commonTestConfig.durationQuerySince = cfg.durationQuerySince
80 test := DeleteSeriesTest{
81 Case: NewSimpleTestCase(name, f, commonTestConfig),
82 cfg: cfg,
83 commonTestConfig: commonTestConfig,
84 quit: make(chan struct{}),
85 }
86
87 if cfg.purgerAddr == "" {
88 test.cfg.purgerAddr = test.cfg.PrometheusAddr
89 }
90
91 test.wg.Add(1)
92 go test.sendDeleteRequestLoop()
93 return &test
94}
95
96func (d *DeleteSeriesTest) Stop() {
97 close(d.quit)

Callers 1

mainFunction · 0.92

Calls 3

sendDeleteRequestLoopMethod · 0.95
NewSimpleTestCaseFunction · 0.85
AddMethod · 0.45

Tested by

no test coverage detected