Skip to content

Commit

Permalink
mark TestExpDecaySampleNanosecondRegression flaky (#1163)
Browse files Browse the repository at this point in the history
  • Loading branch information
darioush authored May 3, 2024
1 parent 502852a commit 73261d7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions metrics/sample_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package metrics
import (
"math"
"math/rand"
"os"
"runtime"
"testing"
"time"
Expand Down Expand Up @@ -132,6 +133,9 @@ func TestExpDecaySample(t *testing.T) {
// The priority becomes +Inf quickly after starting if this is done,
// effectively freezing the set of samples until a rescale step happens.
func TestExpDecaySampleNanosecondRegression(t *testing.T) {
if os.Getenv("RUN_FLAKY_TESTS") != "true" {
t.Skip("FLAKY")
}
sw := NewExpDecaySample(100, 0.99)
for i := 0; i < 100; i++ {
sw.Update(10)
Expand Down

0 comments on commit 73261d7

Please sign in to comment.