MCPcopy Create free account
hub / github.com/apache/thrift / readerWorkerMustThrow

Function readerWorkerMustThrow

lib/cpp/test/TSocketInterruptTest.cpp:43–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43void 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
53BOOST_AUTO_TEST_CASE(test_interruptable_child_read) {
54 TServerSocket sock1("localhost", 0);

Callers

nothing calls this directly

Calls 2

readMethod · 0.65
getTypeMethod · 0.45

Tested by

no test coverage detected