diff options
Diffstat (limited to 'pool_test.go')
-rw-r--r-- | pool_test.go | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/pool_test.go b/pool_test.go deleted file mode 100644 index 998dd9d4..00000000 --- a/pool_test.go +++ /dev/null @@ -1,53 +0,0 @@ -package roadrunner - -import ( - "testing" - "time" - - "github.com/stretchr/testify/assert" -) - -func Test_NumWorkers(t *testing.T) { - cfg := Config{ - AllocateTimeout: time.Second, - DestroyTimeout: time.Second * 10, - } - err := cfg.Valid() - - assert.NotNil(t, err) - 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, - ExecTTL: time.Second * 5, - } - - assert.NoError(t, cfg.InitDefaults()) - err := cfg.Valid() - assert.Nil(t, err) -} - -func Test_AllocateTimeout(t *testing.T) { - cfg := Config{ - NumWorkers: 10, - DestroyTimeout: time.Second * 10, - } - err := cfg.Valid() - - assert.NotNil(t, err) - assert.Equal(t, "pool.AllocateTimeout must be set", err.Error()) -} - -func Test_DestroyTimeout(t *testing.T) { - cfg := Config{ - NumWorkers: 10, - AllocateTimeout: time.Second, - } - err := cfg.Valid() - - assert.NotNil(t, err) - assert.Equal(t, "pool.DestroyTimeout must be set", err.Error()) -} |