]> Cypherpunks repositories - gostls13.git/commit
log/syslog: fix flakey test on slow hosts
authorDave Cheney <dave@cheney.net>
Thu, 13 Dec 2012 05:26:20 +0000 (16:26 +1100)
committerDave Cheney <dave@cheney.net>
Thu, 13 Dec 2012 05:26:20 +0000 (16:26 +1100)
commitae12e963505f71bfd5ddb427ba0f0c546c422c30
treed82b0fb8894a8d06b27935cb5ec23d00f527c697
parent641d152935233c4d25f84a11c02f5b8fedf91210
log/syslog: fix flakey test on slow hosts

Fixes #4467.

The syslog tests can fail if the timeout fires before the data arrives at the mock server. Moving the timeout onto the goroutine that is calling ReadFrom() and always processing the data returned before handling the error should improve the reliability of the test.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6920047
src/pkg/log/syslog/syslog_test.go