1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-08-08 09:42:06 +03:00

Refactor writeChain function signature not to reutrn IOBuf

Summary: Updating signature of writeChain to stop returning IOBuf, as implementation never actually returns back buffer and always writes full buffer.

Reviewed By: mjoras

Differential Revision: D21740607

fbshipit-source-id: f473ed8f3c6c6cbe2dd5db8f1247c912f3e77d0b
This commit is contained in:
Andrii Vasylevskyi
2020-06-02 05:13:46 -07:00
committed by Facebook GitHub Bot
parent a5fc482c6a
commit 7a50ca13c7
7 changed files with 9 additions and 59 deletions

View File

@@ -1043,7 +1043,7 @@ TEST_F(QuicTransportImplTest, ConnectionErrorOnWrite) {
auto stream = transport->createBidirectionalStream().value();
EXPECT_CALL(*socketPtr, write(_, _))
.WillOnce(SetErrnoAndReturn(ENETUNREACH, -1));
QuicSocket::WriteResult result = transport->writeChain(
transport->writeChain(
stream, folly::IOBuf::copyBuffer("Hey"), true, false, nullptr);
transport->addDataToStream(
stream, StreamBuffer(folly::IOBuf::copyBuffer("Data"), 0));
@@ -1074,7 +1074,7 @@ TEST_F(QuicTransportImplTest, ReadErrorUnsanitizedErrorMsg) {
throw std::runtime_error("You need to calm down.");
return 0;
}));
QuicSocket::WriteResult result = transport->writeChain(
transport->writeChain(
stream,
folly::IOBuf::copyBuffer("You are being too loud."),
true,
@@ -1097,7 +1097,7 @@ TEST_F(QuicTransportImplTest, ConnectionErrorUnhandledException) {
throw std::runtime_error("Well there's your problem");
return 0;
}));
QuicSocket::WriteResult result = transport->writeChain(
transport->writeChain(
stream, folly::IOBuf::copyBuffer("Hey"), true, false, nullptr);
transport->addDataToStream(
stream, StreamBuffer(folly::IOBuf::copyBuffer("Data"), 0));