(t *testing.T)
| 103 | } |
| 104 | |
| 105 | func TestSamplerDisabledLevels(t *testing.T) { |
| 106 | sampler, logs := fakeSampler(InfoLevel, time.Minute, 1, 100) |
| 107 | |
| 108 | // Shouldn't be counted, because debug logging isn't enabled. |
| 109 | writeSequence(sampler, 1, DebugLevel) |
| 110 | writeSequence(sampler, 2, InfoLevel) |
| 111 | assertSequence(t, logs.TakeAll(), InfoLevel, 2) |
| 112 | } |
| 113 | |
| 114 | func TestSamplerTicking(t *testing.T) { |
| 115 | // Ensure that we're resetting the sampler's counter every tick. |
nothing calls this directly
no test coverage detected