feat: slow threshold customizable in mongo (#1186)
This commit is contained in:
14
core/stores/mongo/model_test.go
Normal file
14
core/stores/mongo/model_test.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package mongo
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestWithTimeout(t *testing.T) {
|
||||
o := defaultOptions()
|
||||
WithTimeout(time.Second)(o)
|
||||
assert.Equal(t, time.Second, o.timeout)
|
||||
}
|
||||
Reference in New Issue
Block a user