* wip: backup * wip: backup * wip: backup * backup * backup * backup * add more tests * fix wrong dependency * fix lint errors * remove test due to data race * add tests * fix test error * add mon.Model * add mon.Model unmarshal * add monc * add more tests for monc * add more tests for monc * add docs for mon and monc packages * fix doc errors * chhore: add comment * chore: fix test bug * chore: refine tests * chore: remove primitive.NewObjectID in test code * chore: rename test files for typo
19 lines
373 B
Go
19 lines
373 B
Go
package mon
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestSetSlowThreshold(t *testing.T) {
|
|
assert.Equal(t, defaultSlowThreshold, slowThreshold.Load())
|
|
SetSlowThreshold(time.Second)
|
|
assert.Equal(t, time.Second, slowThreshold.Load())
|
|
}
|
|
|
|
func TestDefaultOptions(t *testing.T) {
|
|
assert.Equal(t, defaultTimeout, defaultOptions().timeout)
|
|
}
|