Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix vty_test race that made it flaky. #2

Merged
merged 1 commit into from Jan 11, 2016

Conversation

baptr
Copy link
Contributor

@baptr baptr commented Dec 30, 2015

By making the server socket blocking and improving the read loop, this
avoids a race where read() would get an EAGAIN and abort before any data
was sent.

Add some more error handling and minor style tweaks while I'm here.

Previously:
$ go test ./quagga -run=TestVTYWrite -count=10 -parallel=1
--- FAIL: TestVTYWrite (0.00s)
vty_test.go:186: Server received []byte{}, want []byte{0x74,
0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x74, 0x65, 0x73,
0x74, 0x0}
FAIL
FAIL github.com/google/seesaw/quagga 0.011s

By making the server socket blocking and improving the read loop, this
avoids a race where read() would get an EAGAIN and abort before any data
was sent.

Add some more error handling and minor style tweaks while I'm here.

Previously:
$ go test ./quagga -run=TestVTYWrite -count=10 -parallel=1
--- FAIL: TestVTYWrite (0.00s)
        vty_test.go:186: Server received []byte{}, want []byte{0x74,
0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x74, 0x65, 0x73,
0x74, 0x0}
FAIL
FAIL    github.com/google/seesaw/quagga 0.011s
4a6f656c added a commit that referenced this pull request Jan 11, 2016
Fix vty_test race that made it flaky.
@4a6f656c 4a6f656c merged commit eef7ddb into google:master Jan 11, 2016
@baptr baptr deleted the vty_test_flake branch January 13, 2016 05:36
@johntwei johntwei mentioned this pull request Oct 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants