Skip to content

Commit

Permalink
improve testing
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Vaillancourt <[email protected]>
  • Loading branch information
timvaillancourt committed May 11, 2024
1 parent 977efa4 commit e006ad6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions go/streamlog/streamlog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,10 @@ func TestShouldSampleQuery(t *testing.T) {
queryLogSampleRate = 0
assert.False(t, shouldSampleQuery())

// for test coverage, can't test a random result
queryLogSampleRate = 0.5
shouldSampleQuery()

queryLogSampleRate = 1.0
assert.True(t, shouldSampleQuery())

Expand Down

0 comments on commit e006ad6

Please sign in to comment.