The client thread first checks is_open() before reading any data, and this is where the tests are failing.
What is "is_open()" expected to return in this case? Should it return nonzero until all pending data has been fetched by the application, or is the application expected to fetch the data before checking is_open()? But how can you then know if you can fetch more data or not?
It seems reasonable that you would call is_open() first, and if it returns nonzero then you call read() (which will throw an exception if close_state > STREAM_OPEN, hence the need to check first). The pikedoc mentions is_open() being able to return 2 sometimes in the nonblocking case. I'm not sure if it's a completely equivalent scenario, but the same mechanism could be used. Another option would of course be to call read() anyway but catch the exception.
If the testsuite can't do this in a correct and non-klugey way, then real code will not be able to either...