PHP Classes

File: config_test.go

Recommend this page to a friend!
  Classes of Wolfy-J   roadrunner   config_test.go   Download  
File: config_test.go
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: roadrunner
Run multiple tasks of PHP in parallel using Golang
Author: By
Last change:
Date: 6 years ago
Size: 786 bytes
 

Contents

Class file image Download
package roadrunner import ( "github.com/stretchr/testify/assert" "testing" "time" ) 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, "config.NumWorkers must be set", err.Error()) } func Test_AllocateTimeout(t *testing.T) { cfg := Config{ NumWorkers: 10, DestroyTimeout: time.Second * 10, } err := cfg.Valid() assert.NotNil(t, err) assert.Equal(t, "config.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, "config.DestroyTimeout must be set", err.Error()) }