braintree / manners

A polite Go HTTP server that shuts down gracefully.
MIT License
997 stars 103 forks source link

TestShutdown intermittently fails #27

Closed FiloSottile closed 9 years ago

FiloSottile commented 9 years ago

Go 1.4.2 - non-b... branch

--- FAIL: TestShutdown (0.00s)
    server_test.go:64: Waitcount should be one, got 0
FiloSottile commented 9 years ago

Here is a probably related error

--- FAIL: TestGracefulness (0.00s)
    server_test.go:30: Expected the waitgroup to equal 1 at shutdown; actually 0
FiloSottile commented 9 years ago

The problem is that StartRoutine has not yet been called.

FiloSottile commented 9 years ago

A stronger way to ensure that the connection entered the new state is needed. Making the handler block instead might be an option.

lionelbarrow commented 9 years ago

Thanks for fixing this. https://github.com/braintree/manners/pull/29 is merged now so I'll close the issue.