()
| 1554 | } |
| 1555 | |
| 1556 | func prepareConfig() Config { |
| 1557 | compactorCfg := Config{} |
| 1558 | flagext.DefaultValues(&compactorCfg) |
| 1559 | |
| 1560 | compactorCfg.retryMinBackoff = 0 |
| 1561 | compactorCfg.retryMaxBackoff = 0 |
| 1562 | |
| 1563 | //Avoid jitter in startup |
| 1564 | compactorCfg.CompactionInterval = 5 * time.Second |
| 1565 | |
| 1566 | // The migration is tested in a dedicated test. |
| 1567 | compactorCfg.BlockDeletionMarksMigrationEnabled = false |
| 1568 | |
| 1569 | // Do not wait for ring stability by default, in order to speed up tests. |
| 1570 | compactorCfg.ShardingRing.WaitStabilityMinDuration = 0 |
| 1571 | compactorCfg.ShardingRing.WaitStabilityMaxDuration = 0 |
| 1572 | |
| 1573 | // Set lower timeout for waiting on compactor to become ACTIVE in the ring for unit tests |
| 1574 | compactorCfg.ShardingRing.WaitActiveInstanceTimeout = 5 * time.Second |
| 1575 | |
| 1576 | return compactorCfg |
| 1577 | } |
| 1578 | |
| 1579 | func prepare(t *testing.T, compactorCfg Config, bucketClient objstore.InstrumentedBucket, limits *validation.Limits) (*Compactor, *tsdbCompactorMock, *tsdbPlannerMock, *concurrency.SyncBuffer, prometheus.Gatherer) { |
| 1580 | storageCfg := cortex_tsdb.BlocksStorageConfig{} |
no test coverage detected