In the test test_unexpected_down(), there is client running on CPU0
and server runing on CPU1, the server maybe finished before the client
(client and other workloads share CPU0), so client couldn't read data
and throws "dispatch_sockets(): cb_client() got unexpected exception
std::system_error (error crimson::net:4, read eof)"
Signed-off-by: luo rixin <luorixin@huawei.com>
future<> test_unexpected_down() {
logger.info("test_unexpected_down()...");
return SocketFactory::dispatch_sockets(
- [] (auto cs) { return Connection::dispatch_rw_bounded(cs, 128, true); },
+ [] (auto cs) {
+ return Connection::dispatch_rw_bounded(cs, 128, true
+ ).handle_exception_type([] (const std::system_error& e) {
+ logger.debug("test_unexpected_down(): client get error {}", e);
+ ceph_assert(e.code() == error::read_eof);
+ });
+ },
[] (auto ss) { return Connection::dispatch_rw_unbounded(ss); }
).then([] {
logger.info("test_unexpected_down() ok\n");