select returns nil when timeout expires, add a test covering that case