Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

Failing test for connection handler in Linux #821

Closed
agarciamontoro opened this issue Sep 16, 2019 · 1 comment · Fixed by #824
Closed

Failing test for connection handler in Linux #821

agarciamontoro opened this issue Sep 16, 2019 · 1 comment · Fixed by #824
Assignees
Labels
bug Something isn't working

Comments

@agarciamontoro
Copy link
Contributor

handler_linux_test.go fails with the following error:

12:16 $ go test ./...
ok      github.com/src-d/go-mysql-server        2.559s
ok      github.com/src-d/go-mysql-server/auth   (cached)
ok      github.com/src-d/go-mysql-server/benchmark      (cached) [no tests to run]
ok      github.com/src-d/go-mysql-server/internal/regex (cached)
ok      github.com/src-d/go-mysql-server/internal/similartext   (cached)
?       github.com/src-d/go-mysql-server/internal/sockstate     [no test files]
ok      github.com/src-d/go-mysql-server/memory (cached)
time="2019-09-16T12:16:20+02:00" level=info msg="NewConnection: client 1"
--- FAIL: TestBrokenConnection (4.01s)
    require.go:172: 
                Error Trace:    handler_linux_test.go:51
                Error:          An error is expected but got nil.
                Test:           TestBrokenConnection
time="2019-09-16T12:16:24+02:00" level=info msg="NewConnection: client 1"
time="2019-09-16T12:16:24+02:00" level=info msg="NewConnection: client 1"
time="2019-09-16T12:16:24+02:00" level=info msg="NewConnection: client 2"
time="2019-09-16T12:16:24+02:00" level=info msg="kill query: pid 2"
time="2019-09-16T12:16:24+02:00" level=info msg="kill connection: id 1"
time="2019-09-16T12:16:24+02:00" level=info msg="NewConnection: client 1"
time="2019-09-16T12:16:24+02:00" level=info msg="NewConnection: client 2"
time="2019-09-16T12:16:27+02:00" level=info msg="NewConnection: client 2"
FAIL
FAIL    github.com/src-d/go-mysql-server/server 11.604s
ok      github.com/src-d/go-mysql-server/sql    (cached)
ok      github.com/src-d/go-mysql-server/sql/analyzer   (cached)
ok      github.com/src-d/go-mysql-server/sql/expression (cached)
ok      github.com/src-d/go-mysql-server/sql/expression/function        (cached)
ok      github.com/src-d/go-mysql-server/sql/expression/function/aggregation    (cached)
ok      github.com/src-d/go-mysql-server/sql/index      (cached)
ok      github.com/src-d/go-mysql-server/sql/index/pilosa       (cached)
ok      github.com/src-d/go-mysql-server/sql/parse      (cached)
ok      github.com/src-d/go-mysql-server/sql/plan       (cached)
?       github.com/src-d/go-mysql-server/test   [no test files]
FAIL

I am on current master (a478e1e), and I am running the tests from Arch Linux (kernel version 5.2.13-arch1-1-ARCH).

@juanjux
Copy link
Contributor

juanjux commented Sep 16, 2019

This test is somewhat fuzzy because it depends on how quickly the OS changes into TimeWait or SockWait states. Will think of another solution.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants