diff options
author | Wolfy-J <[email protected]> | 2019-02-14 15:08:06 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2019-02-14 15:08:06 +0300 |
commit | 77cb14cd7d6b0773b20065e8e5a3f95d1c5c96f8 (patch) | |
tree | 15dfc710a601cdcd28149c4a7af1326178924089 /config_test.go | |
parent | 278e16855669a5112a9fa627a5db0fedd62266ec (diff) |
default value for numWorkers
Diffstat (limited to 'config_test.go')
-rw-r--r-- | config_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/config_test.go b/config_test.go index 89cde8f1..e51cb2c4 100644 --- a/config_test.go +++ b/config_test.go @@ -17,6 +17,17 @@ func Test_NumWorkers(t *testing.T) { assert.Equal(t, "pool.NumWorkers must be set", err.Error()) } +func Test_NumWorkers_Default(t *testing.T) { + cfg := Config{ + AllocateTimeout: time.Second, + DestroyTimeout: time.Second * 10, + } + + assert.NoError(t, cfg.InitDefaults()) + err := cfg.Valid() + assert.Nil(t, err) +} + func Test_AllocateTimeout(t *testing.T) { cfg := Config{ NumWorkers: 10, |