(name string, f func(time.Time) float64, cfg DeleteSeriesTestConfig, commonTestConfig CommonTestConfig)
| 75 | } |
| 76 | |
| 77 | func 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 | |
| 96 | func (d *DeleteSeriesTest) Stop() { |
| 97 | close(d.quit) |
no test coverage detected