(ctx context.Context, t testing.TB, log log.Logger, tmpDir string)
| 178 | } |
| 179 | |
| 180 | func newStoreWithLogger(ctx context.Context, t testing.TB, log log.Logger, tmpDir string) storage.Store { |
| 181 | s, err := storage.NewStore(storage.Config{ |
| 182 | Trace: tempodb.Config{ |
| 183 | Backend: backend.Local, |
| 184 | Local: &local.Config{ |
| 185 | Path: tmpDir + "/traces", |
| 186 | }, |
| 187 | Block: &common.BlockConfig{ |
| 188 | BloomFP: 0.01, |
| 189 | BloomShardSizeBytes: 100_000, |
| 190 | Version: encoding.LatestEncoding().Version(), |
| 191 | }, |
| 192 | WAL: &wal.Config{ |
| 193 | Filepath: tmpDir + "/wal", |
| 194 | }, |
| 195 | BlocklistPoll: 100 * time.Millisecond, |
| 196 | }, |
| 197 | }, nil, log) |
| 198 | require.NoError(t, err) |
| 199 | |
| 200 | s.EnablePolling(ctx, &ownsEverythingSharder{}, false) |
| 201 | |
| 202 | t.Cleanup(func() { |
| 203 | s.StopAsync() |
| 204 | require.NoError(t, s.AwaitTerminated(context.Background())) |
| 205 | }) |
| 206 | return s |
| 207 | } |
| 208 | |
| 209 | func cutTestBlocks(t testing.TB, w tempodb.Writer, tenantID string, blockCount int, recordCount int) []common.BackendBlock { |
| 210 | blocks := make([]common.BackendBlock, 0) |
no test coverage detected