Fix linting and flaky test

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>
This commit is contained in:
Carrie Edwards 2025-07-10 12:59:06 -07:00
parent 1d56a5f6d2
commit b6aff14ced
2 changed files with 4 additions and 0 deletions

View file

@ -20,6 +20,7 @@ import (
"math"
"os"
"path/filepath"
"slices"
"sort"
"strings"
"sync"
@ -3758,6 +3759,8 @@ func TestTypeUnitMismatchAnnotations(t *testing.T) {
require.NoError(t, res.Err)
warnings, infos := res.Warnings.AsStrings(testCase.expr, 0, 0)
slices.Sort(warnings)
slices.Sort(infos)
testutil.RequireEqual(t, testCase.expectedWarningAnnotations, warnings)
testutil.RequireEqual(t, testCase.expectedInfoAnnotations, infos)
})

View file

@ -16,6 +16,7 @@ package storage
import (
"context"
"fmt"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/util/annotations"
)