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

     1  package mongo
     2  
     3  import (
     4  	"testing"
     5  	"time"
     6  
     7  	"github.com/stretchr/testify/assert"
     8  )
     9  
    10  func TestWithTimeout(t *testing.T) {
    11  	o := defaultOptions()
    12  	WithTimeout(time.Second)(o)
    13  	assert.Equal(t, time.Second, o.timeout)
    14  }