diff options
author | Valery Piashchynski <[email protected]> | 2020-02-26 18:12:40 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-02-26 18:12:40 +0300 |
commit | 53859e193b89082c83d7a190baa97892075d259c (patch) | |
tree | 7791c8bf6f4d17f349f267c44ffb130edc9cf2b3 | |
parent | 038517ca5e4e8d53614ca406fd2edda306a58875 (diff) |
Test update
Ci remove windows
-rw-r--r-- | .github/workflows/ci-build.yml | 4 | ||||
-rw-r--r-- | service/reload/config_test.go | 2 | ||||
-rw-r--r-- | static_pool_test.go | 2 | ||||
-rw-r--r-- | util/network_test.go | 7 | ||||
-rw-r--r-- | util/network_windows_test.go | 16 |
5 files changed, 22 insertions, 9 deletions
diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 468d39fd..19ba0857 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -10,8 +10,8 @@ jobs: fail-fast: false matrix: php: [7.1, 7.2, 7.3, 7.4] - go: [1.12, 1.13] - os: [ubuntu-latest, macOS-latest, windows-latest] + go: [1.12, 1.13, 1.14] + os: [ubuntu-latest, macOS-latest] env: GO111MODULE: on steps: diff --git a/service/reload/config_test.go b/service/reload/config_test.go index c9c05a1e..cefb6544 100644 --- a/service/reload/config_test.go +++ b/service/reload/config_test.go @@ -27,7 +27,7 @@ func Test_Config_Valid(t *testing.T) { func Test_Fake_ServiceConfig(t *testing.T) { services := make(map[string]ServiceConfig) cfg := &Config{ - Interval: time.Second, + Interval: time.Microsecond, Patterns: nil, Services: services, } diff --git a/static_pool_test.go b/static_pool_test.go index 1f185f58..ee1bb3de 100644 --- a/static_pool_test.go +++ b/static_pool_test.go @@ -234,7 +234,7 @@ func Test_StaticPool_AllocateTimeout(t *testing.T) { }() // to ensure that worker is already busy - time.Sleep(time.Millisecond * 10) + time.Sleep(time.Millisecond * 1) _, err = p.Exec(&Payload{Body: []byte("10")}) assert.Error(t, err) diff --git a/util/network_test.go b/util/network_test.go index 830e1b8a..09157ec0 100644 --- a/util/network_test.go +++ b/util/network_test.go @@ -1,8 +1,9 @@ +// +build linux darwin freebsd + package util import ( "github.com/stretchr/testify/assert" - "runtime" "testing" ) @@ -15,10 +16,6 @@ func TestCreateListener(t *testing.T) { } func TestUnixCreateListener(t *testing.T) { - if runtime.GOOS == "windows" { - t.Skip("not supported on " + runtime.GOOS) - } - l, err := CreateListener("unix://file.sock") assert.NoError(t, err) l.Close() diff --git a/util/network_windows_test.go b/util/network_windows_test.go new file mode 100644 index 00000000..a5a8064e --- /dev/null +++ b/util/network_windows_test.go @@ -0,0 +1,16 @@ +// +build windows + +package util + +import ( + "github.com/stretchr/testify/assert" + "testing" +) + +func TestCreateListener(t *testing.T) { + _, err := CreateListener("unexpected dsn") + assert.Error(t, err, "Invalid DSN (tcp://:6001, unix://file.sock)") + + _, err = CreateListener("aaa://192.168.0.1") + assert.Error(t, err, "Invalid Protocol (tcp://:6001, unix://file.sock)") +}
\ No newline at end of file |