| 41 | } |
| 42 | |
| 43 | void readerWorkerMustThrow(std::shared_ptr<TTransport> tt) { |
| 44 | try { |
| 45 | uint8_t buf[4]; |
| 46 | tt->read(buf, 4); |
| 47 | BOOST_ERROR("should not have gotten here"); |
| 48 | } catch (const TTransportException& tx) { |
| 49 | BOOST_CHECK_EQUAL(TTransportException::INTERRUPTED, tx.getType()); |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | BOOST_AUTO_TEST_CASE(test_interruptable_child_read) { |
| 54 | TServerSocket sock1("localhost", 0); |