options_test.go 273 B

1234567891011121314
  1. package mongo
  2. import (
  3. "testing"
  4. "time"
  5. "github.com/stretchr/testify/assert"
  6. )
  7. func TestSetSlowThreshold(t *testing.T) {
  8. assert.Equal(t, defaultSlowThreshold, slowThreshold.Load())
  9. SetSlowThreshold(time.Second)
  10. assert.Equal(t, time.Second, slowThreshold.Load())
  11. }