diff --git a/go/streamlog/streamlog_test.go b/go/streamlog/streamlog_test.go index 1a703cdf2e5..63beb2e48b1 100644 --- a/go/streamlog/streamlog_test.go +++ b/go/streamlog/streamlog_test.go @@ -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())