Skip to content

Commit

Permalink
fix metrics/sample tests
Browse files Browse the repository at this point in the history
  • Loading branch information
libotony committed Aug 12, 2024
1 parent 83617ac commit fcf38d9
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions metrics/sample_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,16 @@ func TestUniformSampleIncludesTail(t *testing.T) {
}
}

// func TestUniformSampleSnapshot(t *testing.T) {
// s := NewUniformSample(100)
// for i := 1; i <= 10000; i++ {
// s.Update(int64(i))
// }
// snapshot := s.Snapshot()
// s.Update(1)
// testUniformSampleStatistics(t, snapshot)
// }
func TestUniformSampleSnapshot(t *testing.T) {
rand.Seed(1)
s := NewUniformSample(100)
for i := 1; i <= 10000; i++ {
s.Update(int64(i))
}
snapshot := s.Snapshot()
s.Update(1)
testUniformSampleStatistics(t, snapshot)
}

func TestUniformSampleStatistics(t *testing.T) {
rand.Seed(1)
Expand Down

0 comments on commit fcf38d9

Please sign in to comment.