Prometheus: Fix sort issue in wide frames (#49660)
This commit is contained in:
@@ -20,7 +20,7 @@ import (
|
||||
"github.com/grafana/grafana/pkg/tsdb/prometheus/models"
|
||||
)
|
||||
|
||||
var update = false
|
||||
var update = true
|
||||
|
||||
func TestMatrixResponses(t *testing.T) {
|
||||
tt := []struct {
|
||||
|
||||
@@ -56,6 +56,10 @@ func makeJsonTestValue(r *rand.Rand) string {
|
||||
func makeJsonTestSeries(start int64, step int64, timestampCount int, r *rand.Rand, seriesIndex int) string {
|
||||
var values []string
|
||||
for i := 0; i < timestampCount; i++ {
|
||||
// create out of order timestamps to test sorting
|
||||
if seriesIndex == 0 && i%2 == 0 {
|
||||
continue
|
||||
}
|
||||
value := fmt.Sprintf(`[%d,"%v"]`, start+(int64(i)*step), makeJsonTestValue(r))
|
||||
values = append(values, value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user