feat: slow threshold customizable in mongo (#1186)

This commit is contained in:
Kevin Wan
2021-11-01 07:12:53 +08:00
committed by GitHub
parent 429f85a9de
commit 8be0f77d96
6 changed files with 68 additions and 23 deletions

View 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)
}