mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-12 06:17:27 -08:00
Fix test
Some checks failed
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Some checks failed
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
This commit is contained in:
parent
a046417bc0
commit
1933ccc9be
110
tsdb/db_test.go
110
tsdb/db_test.go
|
@ -6469,7 +6469,7 @@ func testOOOInterleavedImplicitCounterResets(t *testing.T, name string, scenario
|
||||||
Sum: float64(v),
|
Sum: float64(v),
|
||||||
PositiveSpans: []histogram.Span{{Offset: 0, Length: 1}},
|
PositiveSpans: []histogram.Span{{Offset: 0, Length: 1}},
|
||||||
PositiveBuckets: []int64{v},
|
PositiveBuckets: []int64{v},
|
||||||
CustomValues: []float64{float64(v)},
|
CustomValues: []float64{float64(1), float64(2), float64(3)},
|
||||||
}
|
}
|
||||||
_, err := app.AppendHistogram(0, labels.FromStrings("foo", "bar1"), ts, h, nil)
|
_, err := app.AppendHistogram(0, labels.FromStrings("foo", "bar1"), ts, h, nil)
|
||||||
return err
|
return err
|
||||||
|
@ -6482,7 +6482,7 @@ func testOOOInterleavedImplicitCounterResets(t *testing.T, name string, scenario
|
||||||
Sum: float64(v),
|
Sum: float64(v),
|
||||||
PositiveSpans: []histogram.Span{{Offset: 0, Length: 1}},
|
PositiveSpans: []histogram.Span{{Offset: 0, Length: 1}},
|
||||||
PositiveBuckets: []float64{float64(v)},
|
PositiveBuckets: []float64{float64(v)},
|
||||||
CustomValues: []float64{float64(v)},
|
CustomValues: []float64{float64(1), float64(2), float64(3)},
|
||||||
}
|
}
|
||||||
_, err := app.AppendHistogram(0, labels.FromStrings("foo", "bar1"), ts, nil, fh)
|
_, err := app.AppendHistogram(0, labels.FromStrings("foo", "bar1"), ts, nil, fh)
|
||||||
return err
|
return err
|
||||||
|
@ -6517,29 +6517,29 @@ func testOOOInterleavedImplicitCounterResets(t *testing.T, name string, scenario
|
||||||
// The expected counter reset hint for each chunk.
|
// The expected counter reset hint for each chunk.
|
||||||
expectedChunks []expectedChunk
|
expectedChunks []expectedChunk
|
||||||
}{
|
}{
|
||||||
//"counter reset in-order cleared by in-memory OOO chunk": {
|
"counter reset in-order cleared by in-memory OOO chunk": {
|
||||||
// samples: []tsValue{
|
samples: []tsValue{
|
||||||
// {1, 40}, // New in In-order. I1.
|
{1, 40}, // New in In-order. I1.
|
||||||
// {4, 30}, // In-order counter reset. I2.
|
{4, 30}, // In-order counter reset. I2.
|
||||||
// {2, 40}, // New in OOO. O1.
|
{2, 40}, // New in OOO. O1.
|
||||||
// {3, 10}, // OOO counter reset. O2.
|
{3, 10}, // OOO counter reset. O2.
|
||||||
// },
|
},
|
||||||
// oooCap: 30,
|
oooCap: 30,
|
||||||
// // Expect all to be set to UnknownCounterReset because we switch between
|
// Expect all to be set to UnknownCounterReset because we switch between
|
||||||
// // in-order and out-of-order samples.
|
// in-order and out-of-order samples.
|
||||||
// expectedSamples: []expectedTsValue{
|
expectedSamples: []expectedTsValue{
|
||||||
// {1, 40, histogram.UnknownCounterReset}, // I1.
|
{1, 40, histogram.UnknownCounterReset}, // I1.
|
||||||
// {2, 40, histogram.UnknownCounterReset}, // O1.
|
{2, 40, histogram.UnknownCounterReset}, // O1.
|
||||||
// {3, 10, histogram.UnknownCounterReset}, // O2.
|
{3, 10, histogram.UnknownCounterReset}, // O2.
|
||||||
// {4, 30, histogram.UnknownCounterReset}, // I2. Counter reset cleared by iterator change.
|
{4, 30, histogram.UnknownCounterReset}, // I2. Counter reset cleared by iterator change.
|
||||||
// },
|
},
|
||||||
// expectedChunks: []expectedChunk{
|
expectedChunks: []expectedChunk{
|
||||||
// {histogram.UnknownCounterReset, 1}, // I1.
|
{histogram.UnknownCounterReset, 1}, // I1.
|
||||||
// {histogram.UnknownCounterReset, 1}, // O1.
|
{histogram.UnknownCounterReset, 1}, // O1.
|
||||||
// {histogram.UnknownCounterReset, 1}, // O2.
|
{histogram.UnknownCounterReset, 1}, // O2.
|
||||||
// {histogram.UnknownCounterReset, 1}, // I2.
|
{histogram.UnknownCounterReset, 1}, // I2.
|
||||||
// },
|
},
|
||||||
//},
|
},
|
||||||
"counter reset in OOO mmapped chunk cleared by in-memory ooo chunk": {
|
"counter reset in OOO mmapped chunk cleared by in-memory ooo chunk": {
|
||||||
samples: []tsValue{
|
samples: []tsValue{
|
||||||
{8, 30}, // In-order, new chunk. I1.
|
{8, 30}, // In-order, new chunk. I1.
|
||||||
|
@ -6570,36 +6570,36 @@ func testOOOInterleavedImplicitCounterResets(t *testing.T, name string, scenario
|
||||||
{histogram.UnknownCounterReset, 1}, // I1.
|
{histogram.UnknownCounterReset, 1}, // I1.
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
//"counter reset in OOO mmapped chunk cleared by another OOO mmapped chunk": {
|
"counter reset in OOO mmapped chunk cleared by another OOO mmapped chunk": {
|
||||||
// samples: []tsValue{
|
samples: []tsValue{
|
||||||
// {8, 100}, // In-order, new chunk. I1.
|
{8, 100}, // In-order, new chunk. I1.
|
||||||
// {1, 50}, // OOO, new chunk (will be mmapped). MO1.
|
{1, 50}, // OOO, new chunk (will be mmapped). MO1.
|
||||||
// {5, 40}, // OOO, reset (will be mmapped). MO2.
|
{5, 40}, // OOO, reset (will be mmapped). MO2.
|
||||||
// {6, 50}, // OOO, no reset (will be mmapped). MO2.
|
{6, 50}, // OOO, no reset (will be mmapped). MO2.
|
||||||
// {2, 10}, // OOO, new chunk no reset (will be mmapped). MO3.
|
{2, 10}, // OOO, new chunk no reset (will be mmapped). MO3.
|
||||||
// {3, 20}, // OOO, no reset (will be mmapped). MO3.
|
{3, 20}, // OOO, no reset (will be mmapped). MO3.
|
||||||
// {4, 30}, // OOO, no reset (will be mmapped). MO3.
|
{4, 30}, // OOO, no reset (will be mmapped). MO3.
|
||||||
// {7, 60}, // OOO, no reset in memory. O1.
|
{7, 60}, // OOO, no reset in memory. O1.
|
||||||
// },
|
},
|
||||||
// oooCap: 3,
|
oooCap: 3,
|
||||||
// expectedSamples: []expectedTsValue{
|
expectedSamples: []expectedTsValue{
|
||||||
// {1, 50, histogram.UnknownCounterReset}, // MO1.
|
{1, 50, histogram.UnknownCounterReset}, // MO1.
|
||||||
// {2, 10, histogram.UnknownCounterReset}, // MO3.
|
{2, 10, histogram.UnknownCounterReset}, // MO3.
|
||||||
// {3, 20, histogram.NotCounterReset}, // MO3.
|
{3, 20, histogram.NotCounterReset}, // MO3.
|
||||||
// {4, 30, histogram.NotCounterReset}, // MO3.
|
{4, 30, histogram.NotCounterReset}, // MO3.
|
||||||
// {5, 40, histogram.UnknownCounterReset}, // MO2.
|
{5, 40, histogram.UnknownCounterReset}, // MO2.
|
||||||
// {6, 50, histogram.NotCounterReset}, // MO2.
|
{6, 50, histogram.NotCounterReset}, // MO2.
|
||||||
// {7, 60, histogram.UnknownCounterReset}, // O1.
|
{7, 60, histogram.UnknownCounterReset}, // O1.
|
||||||
// {8, 100, histogram.UnknownCounterReset}, // I1.
|
{8, 100, histogram.UnknownCounterReset}, // I1.
|
||||||
// },
|
},
|
||||||
// expectedChunks: []expectedChunk{
|
expectedChunks: []expectedChunk{
|
||||||
// {histogram.UnknownCounterReset, 1}, // MO1.
|
{histogram.UnknownCounterReset, 1}, // MO1.
|
||||||
// {histogram.UnknownCounterReset, 3}, // MO3.
|
{histogram.UnknownCounterReset, 3}, // MO3.
|
||||||
// {histogram.UnknownCounterReset, 2}, // MO2.
|
{histogram.UnknownCounterReset, 2}, // MO2.
|
||||||
// {histogram.UnknownCounterReset, 1}, // O1.
|
{histogram.UnknownCounterReset, 1}, // O1.
|
||||||
// {histogram.UnknownCounterReset, 1}, // I1.
|
{histogram.UnknownCounterReset, 1}, // I1.
|
||||||
// },
|
},
|
||||||
//},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for tcName, tc := range cases {
|
for tcName, tc := range cases {
|
||||||
|
|
Loading…
Reference in a new issue