mirror of
https://github.com/prometheus/prometheus.git
synced 2024-09-19 23:37:31 -07:00
error
Signed-off-by: Vanshikav123 <vanshikav928@gmail.com>
This commit is contained in:
parent
4ecdfe0d72
commit
60b0d1c012
|
@ -1206,6 +1206,8 @@ func TestSetHintsHandlingStaleness(t *testing.T) {
|
|||
go func() {
|
||||
runScrapeLoop(ctx, t, capp, 2, func(sl *scrapeLoop) {
|
||||
go sl.stop()
|
||||
// Wait a bit then start a new target.
|
||||
time.Sleep(5 * time.Millisecond)
|
||||
go func() {
|
||||
runScrapeLoop(ctx, t, capp, 4, func(_ *scrapeLoop) {
|
||||
cancel()
|
||||
|
@ -1228,9 +1230,10 @@ func TestSetHintsHandlingStaleness(t *testing.T) {
|
|||
for _, v := range capp.resultFloats {
|
||||
if v.metric.Get("__name__") == "metric_a" {
|
||||
// Check for out-of-order samples
|
||||
//fmt.Println(v)
|
||||
fmt.Println(v)
|
||||
if v.t <= prevT {
|
||||
// Ensure out-of-order sample's value is NaN
|
||||
//fmt.Println(prevT)
|
||||
require.True(t, math.IsNaN(v.f), "Expected NaN value for out-of-order sample at timestamp %d", v.t)
|
||||
}
|
||||
prevT = v.t
|
||||
|
|
Loading…
Reference in a new issue