(t *testing.T)
| 6877 | } |
| 6878 | |
| 6879 | func TestIngester_MaxExemplarsFallBack(t *testing.T) { |
| 6880 | // Create ingester. |
| 6881 | cfg := defaultIngesterTestConfig(t) |
| 6882 | cfg.BlocksStorageConfig.TSDB.MaxExemplars = 2 |
| 6883 | |
| 6884 | dir := t.TempDir() |
| 6885 | blocksDir := filepath.Join(dir, "blocks") |
| 6886 | limits := defaultLimitsTestConfig() |
| 6887 | limits.EnableNativeHistograms = true |
| 6888 | i, err := prepareIngesterWithBlocksStorageAndLimits(t, cfg, limits, nil, blocksDir, prometheus.NewRegistry()) |
| 6889 | require.NoError(t, err) |
| 6890 | |
| 6891 | maxExemplars := i.getMaxExemplars("someTenant") |
| 6892 | require.Equal(t, maxExemplars, int64(2)) |
| 6893 | |
| 6894 | // set max exemplars value in limits, and re-initialize the ingester |
| 6895 | limits.MaxExemplars = 5 |
| 6896 | i, err = prepareIngesterWithBlocksStorageAndLimits(t, cfg, limits, nil, blocksDir, prometheus.NewRegistry()) |
| 6897 | require.NoError(t, err) |
| 6898 | |
| 6899 | // validate this value is picked up now |
| 6900 | maxExemplars = i.getMaxExemplars("someTenant") |
| 6901 | require.Equal(t, maxExemplars, int64(5)) |
| 6902 | } |
| 6903 | |
| 6904 | func Test_Ingester_QueryExemplar_MaxInflightQueryRequest(t *testing.T) { |
| 6905 | cfg := defaultIngesterTestConfig(t) |
nothing calls this directly
no test coverage detected