github.com/lingyao2333/mo-zero@v1.4.1/core/stores/mon/options_test.go (about)

     1  package mon
     2  
     3  import (
     4  	"testing"
     5  	"time"
     6  
     7  	"github.com/stretchr/testify/assert"
     8  )
     9  
    10  func TestSetSlowThreshold(t *testing.T) {
    11  	assert.Equal(t, defaultSlowThreshold, slowThreshold.Load())
    12  	SetSlowThreshold(time.Second)
    13  	assert.Equal(t, time.Second, slowThreshold.Load())
    14  }
    15  
    16  func TestDefaultOptions(t *testing.T) {
    17  	assert.Equal(t, defaultTimeout, defaultOptions().timeout)
    18  }